blib/lib/App/RedisTop/Component/Memory.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::Memory; | ||||||
2 | 2 | 2 | 1511 | use base 'App::RedisTop::Component'; | |||
2 | 4 | ||||||
2 | 262 | ||||||
3 | sub new { | ||||||
4 | 1 | 1 | 0 | 3 | my $class = shift; | ||
5 | |||||||
6 | 1 | 20 | my $self = bless { | ||||
7 | group => 'mem', | ||||||
8 | items => [ | ||||||
9 | { name => 'use', stat_key => 'used_memory', }, | ||||||
10 | { name => 'rss', stat_key => 'used_memory_rss', }, | ||||||
11 | { name => 'frag', stat_key => 'mem_fragmentation_ratio', }, | ||||||
12 | ], | ||||||
13 | width => 7, | ||||||
14 | unit => 1, | ||||||
15 | @_, | ||||||
16 | }, $class; | ||||||
17 | } | ||||||
18 | |||||||
19 | 1; |