File Coverage

blib/lib/Net/PulseMeter/Sensor/Timelined/HashedCounter.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 17 18 94.4


line stmt bran cond sub pod time code
1             package Net::PulseMeter::Sensor::Timelined::HashedCounter;
2 1     1   675 use strict;
  1         3  
  1         33  
3 1     1   5 use warnings 'all';
  1         2  
  1         35  
4              
5 1     1   4 use base qw/Net::PulseMeter::Sensor::Timeline/;
  1         3  
  1         523  
6              
7             sub aggregate_event {
8 2     2 0 4 my ($self, $key, $data) = @_;
9 2         14 for (keys(%$data)) {
10 4         1603 $self->r->hincrby($key, $_, $data->{$_});
11 4         3161 $self->r->hincrby($key, "total", $data->{$_});
12             }
13             }
14              
15             1;