line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Cisco::UCS::Chassis::Stats; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use Scalar::Util qw(weaken); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
199
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.50'; |
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
|
|
5
|
{ no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
192
|
|
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__ |