blib/lib/Net/PulseMeter/Sensor/Timelined/Percentile.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 14 | 14 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 19 | 20 | 95.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Net::PulseMeter::Sensor::Timelined::Percentile; | ||||||
2 | 3 | 3 | 766 | use strict; | |||
3 | 7 | ||||||
3 | 114 | ||||||
3 | 3 | 3 | 16 | use warnings 'all'; | |||
3 | 5 | ||||||
3 | 215 | ||||||
4 | 3 | 3 | 757 | use Data::Uniqid qw/uniqid/; | |||
3 | 48662 | ||||||
3 | 167 | ||||||
5 | |||||||
6 | 3 | 3 | 19 | use base qw/Net::PulseMeter::Sensor::Timeline/; | |||
3 | 15 | ||||||
3 | 1888 | ||||||
7 | |||||||
8 | sub aggregate_event { | ||||||
9 | 6 | 6 | 0 | 12 | my ($self, $key, $value) = @_; | ||
10 | 6 | 20 | $self->r->zadd( | ||||
11 | $key, | ||||||
12 | $value, | ||||||
13 | sprintf("%s::%s", $value, uniqid()) | ||||||
14 | ); | ||||||
15 | } | ||||||
16 | |||||||
17 | 1; |