blib/lib/App/RedisTop/Component/CPU.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 5 | 5 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 7 | 8 | 87.5 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package App::RedisTop::Component::CPU; | ||||||
2 | 2 | 2 | 21961 | use base 'App::RedisTop::Component'; | |||
2 | 6 | ||||||
2 | 818 | ||||||
3 | sub new { | ||||||
4 | 1 | 1 | 0 | 57 | my $class = shift; | ||
5 | 1 | 26 | my $self = bless { | ||||
6 | group => 'cpu', | ||||||
7 | items => [ | ||||||
8 | { name => 'sys', stat_key => 'used_cpu_sys', diff => 1 }, | ||||||
9 | { name => 'usr', stat_key => 'used_cpu_user', diff => 1 }, | ||||||
10 | ], | ||||||
11 | width => 6, | ||||||
12 | round => 1, | ||||||
13 | @_, | ||||||
14 | }, $class; | ||||||
15 | } | ||||||
16 | |||||||
17 | 1; |