line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Tomcat::Connector::Scoreboard::Entry; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @ATTR = qw(stage time client vhost request b_sent b_recv); |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
|
|
165
|
foreach my $attr ( @ATTR ) {{ |
9
|
1
|
|
|
1
|
|
3
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
10
|
|
|
|
|
|
|
*{ __PACKAGE__ . "::$attr" } = sub { |
11
|
0
|
|
|
0
|
|
|
my ( $self, $val ) = @_; |
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
12
|
0
|
0
|
|
|
|
|
$self->{$attr} = $val if $val; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
return $self->{$attr} } |
15
|
|
|
|
|
|
|
}} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
0
|
|
|
0
|
1
|
|
my ( $class, %args ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
21
|
0
|
|
|
|
|
|
$self->{$_} = $args{$_} for @ATTR; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
return $self |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub bytes_sent { return $_[0]->{b_sent} } |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
sub bytes_received { return $_[0]->{b_recv} } |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |