NAME
Statistics::CountAverage - Perl extension for blah blah blah
SYNOPSIS
use Statistics::CountAverage;
my $avg = new Statistics::CountAverage(100);
$avg->count;
...
$avg->count(10);
...
if($avg->check(5)){
print "speed: ",$avg->speed,"\n";
}
print "rate: ",$avg->rate,"\n";
print "rate: ",$avg->av,"\n";
DESCRIPTION
accamulate number events and calculate averages
FUNCTIONS
count(number)
count number action
$avg->count(10);
$avg->count; # default 1
check(sec)
return true if elapset sec from last true
$avg->check(5);
if($avg->check(5)){
# elapsed 5 sec for last true from check
}
speed
calculate average summ of number in count per 1 second
rate
calculate average number call count per 1 second
avg
calculate average number of count per one call count
stat
return hashref
speed => $avg->speed,
rate => $avg->rate,
avg => $avg->avg,
SEE ALSO
AUTHOR
Ildar Efremov, <iefremov@2reallife.com>
COPYRIGHT AND LICENSE
Copyright (C) 2011 by Ildar Efremov
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.