The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::EventStream::Statistics::Continuous - calculate basic parameters of process

VERSION

This document describes Data::EventStream::Statistics::Continuous version 0.13

SYNOPSIS

    use Data::EventStream::Statistics::Continuous;
    my $stat = Data::EventStream::Statistics::Continuous->new(
        value_sub => \&event_value,
        time_sub  => \&event_time,
    );
    $ev_stream->add_aggregator($stat, %params);

DESCRIPTION

Module implements aggregator that calculates basic descriptive parameters of the process defined by the set of events fitting in aggregator's window.

METHODS

$class->new(value_sub => \&value_sub, time_sub => \&time_sub)

Create a new aggregator. Requires value_sub and time_sub parameters which define subroutines that return numeric value and time for an event accordingly.

$self->count

Return number of events in aggregator's window

$self->interval

Interval covered by aggregator's window

$self->integral

Integral time-weighted value of the process on the interval

$self->mean

Average value of the process on the interval

$self->change

Difference between end value and entry value of the process on the interval

STANDARD AGGREGATOR METHODS

See description of the following methods in the documentation for Data::EventStream::Aggregator.

$self->enter($event, $win)

$self->leave($event, $win)

$self->reset($window)

$self->window_update($window)