File Coverage

blib/lib/Net/PulseMeter/Sensor/Timelined/Average.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 16 17 94.1


line stmt bran cond sub pod time code
1             package Net::PulseMeter::Sensor::Timelined::Average;
2 1     1   921 use strict;
  1         2  
  1         50  
3 1     1   7 use warnings 'all';
  1         2  
  1         52  
4              
5 1     1   6 use base qw/Net::PulseMeter::Sensor::Timeline/;
  1         3  
  1         829  
6              
7             sub aggregate_event {
8 2     2 0 4 my ($self, $key, $value) = @_;
9 2         7 $self->r->hincrby($key, "count", 1);
10 2         1593 $self->r->hincrby($key, "sum", $value);
11             }
12              
13             1;