line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Tomcat::JVM; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
85
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
7
|
|
|
|
|
|
|
our @ATTR = qw(free_memory total_memory max_memory); |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
|
|
178
|
foreach my $attr ( @ATTR ) {{ |
10
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
11
|
0
|
|
|
0
|
|
|
*{ __PACKAGE__ . '::' . $attr } = sub { my $self = shift; return $self->{$attr} } |
|
0
|
|
|
0
|
|
|
|
12
|
|
|
|
|
|
|
}} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
0
|
|
|
0
|
0
|
|
my ( $class, %args ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
18
|
0
|
|
|
|
|
|
$self->{$_} = $args{$_} for @ATTR; |
19
|
0
|
|
|
|
|
|
$self->{__timestamp} = time; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
|
|
sub __timestamp { return $_[0]->{__timestamp} } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |