line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Cisco::UCS::Chassis::Stats; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
4
|
1
|
|
|
1
|
|
2
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
3
|
use Scalar::Util qw(weaken); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
70
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.51'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our %V_MAP = ( |
11
|
|
|
|
|
|
|
inputPower => 'input_power', |
12
|
|
|
|
|
|
|
inputPowerAvg => 'input_power_avg', |
13
|
|
|
|
|
|
|
inputPowerMax => 'input_power_max', |
14
|
|
|
|
|
|
|
inputPowerMin => 'input_power_min', |
15
|
|
|
|
|
|
|
outputPower => 'output_power', |
16
|
|
|
|
|
|
|
outputPowerAvg => 'output_power_avg', |
17
|
|
|
|
|
|
|
outputPowerMax => 'output_power_max', |
18
|
|
|
|
|
|
|
outputPowerMin => 'output_power_min', |
19
|
|
|
|
|
|
|
thresholded => 'thresholded', |
20
|
|
|
|
|
|
|
suspect => 'suspect', |
21
|
|
|
|
|
|
|
timeCollected => 'time_collected', |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
4
|
{ no strict 'refs'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
130
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
while ( my ($attribute, $pseudo) = each %V_MAP ) { |
27
|
|
|
|
|
|
|
*{ __PACKAGE__ .'::'. $pseudo } = sub { |
28
|
0
|
|
|
0
|
|
|
my $self = shift; |
29
|
0
|
|
|
|
|
|
return $self->{$attribute} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub new { |
35
|
0
|
|
|
0
|
0
|
|
my ( $class, $args ) = @_; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
foreach my $var ( keys %$args ) { |
40
|
0
|
|
|
|
|
|
$self->{ $var } = $args->{ $var }; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
return $self |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |