UCS/Blade/PowerBudget.pm

filter: Statementstmt 75.8% 22 / 29 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 1 totaltotal 74.3% 29 / 39 CC 2 SCAR 8.3
CC
2
Cov
77%
new
6.0
__ANON__
1.3
BEGIN
1.0
CRAP 2.3
« UCS/Interconnect/Stats.pm ↑ Summary UCS/Blade/CPU.pm »
1 package Cisco::UCS::Blade::PowerBudget;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Cisco::UCS::Blade::PowerBudget;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Scalar::Util qw(weaken);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 our $VERSION = '0.51';
10  
11 2 our %V_MAP = (
12 adminCommitted => 'admin_commited',
13 adminPeak => 'admin_peak',
14 capAction => 'cap_action',
15 catalogPower => 'catalog_power',
16 currentPower => 'current_power',
17 dynRealloc => 'dyn_reallocation',
18 groupName => 'group_name',
19 idlePower => 'idle_power',
20 maxPower => 'max_power',
21 minPower => 'min_power',
22 operCommitted => 'oper_commited',
23 operMin => 'oper_min',
24 operPeak => 'oper_peak',
25 operState => 'oper_state',
26 prio => 'priority',
27 psuCapacity => 'psu_capacity',
28 psuState => 'psu_state',
29 scaledWt => 'scaled_wt',
30 style => 'style',
31 updateTime => 'update_time',
32 weight => 'weight',
33 );
34  
35 2 ▶{ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
36  
37 2 ▶ while ( my ($attribute, $pseudo) = each %V_MAP ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %Cisco::UCS::Blade::PowerBudget::V_MAP) 42 2 44
38 42 ▶ *{ __PACKAGE__ .'::'. $pseudo } = sub {
Subroutine __ANON__: not called CC=1 SCAR=2.6
39 0 my $self = shift;
40 0 return $self->{$attribute}
41 }
42 42 }
43 }
44  
45 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
46 0 my ( $class, $args ) = @_;
47  
48 0 my $self = bless {}, $class;
49
50 0 foreach my $var ( keys %$args ) {
51 0 $self->{ $var } = $args->{ $var };
52 }
53  
54 0 return $self
55 }
56  
57 2 1;
58  
59 __END__
« UCS/Interconnect/Stats.pm ↑ Summary UCS/Blade/CPU.pm »