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