Statistics::CountAverage - Perl extension for blah blah blah
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";
accamulate number events and calculate averages
count number action
$avg->count(10); $avg->count; # default 1
return true if elapset sec from last true
$avg->check(5); if($avg->check(5)){ # elapsed 5 sec for last true from check }
calculate average summ of number in count per 1 second
calculate average number call count per 1 second
calculate average number of count per one call count
return hashref
speed => $avg->speed, rate => $avg->rate, avg => $avg->avg,
Ildar Efremov, <iefremov@2reallife.com>
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.
To install Statistics::CountAverage, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Statistics::CountAverage
CPAN shell
perl -MCPAN -e shell install Statistics::CountAverage
For more information on module installation, please visit the detailed CPAN module installation guide.