line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Monitis::Memory; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
5
|
|
|
|
|
|
|
require Carp; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use base 'Monitis'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
689
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub add { |
10
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my @mandatory = qw/agentkey tag name platform/; |
13
|
0
|
|
|
|
|
|
my @optional = |
14
|
|
|
|
|
|
|
qw/freeLimit freeSwapLimit freeVirtualLimit bufferedLimit cachedLimit/; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
return $self->api_post('addMemoryMonitor' => $params); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub edit { |
22
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my @mandatory = qw/testId tag name platform/; |
25
|
0
|
|
|
|
|
|
my @optional = |
26
|
|
|
|
|
|
|
qw/freeLimit freeSwapLimit freeVirtualLimit bufferedLimit cachedLimit /; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $self->api_post('editMemoryMonitor' => $params); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub get { |
34
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
my @mandatory = qw/agentId/; |
37
|
0
|
|
|
|
|
|
my @optional = qw//; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
return $self->api_get('agentMemory' => $params); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub get_info { |
45
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
my @mandatory = qw/monitorId/; |
48
|
0
|
|
|
|
|
|
my @optional = qw//; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
return $self->api_get('memoryInfo' => $params); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub get_results { |
56
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
my @mandatory = qw/monitorId day month year/; |
59
|
0
|
|
|
|
|
|
my @optional = qw/timezone/; |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
return $self->api_get('memoryResult' => $params); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub get_top_results { |
67
|
0
|
|
|
0
|
1
|
|
my ($self, @params) = @_; |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
my @mandatory = qw//; |
70
|
0
|
|
|
|
|
|
my @optional = qw/timezoneoffset limit tag/; |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
my $params = $self->prepare_params(\@params, \@mandatory, \@optional); |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
return $self->api_get('topmemory' => $params); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
__END__ |