lib/Rex/Inventory/DMIDecode/CPU.pm

filter: Statementstmt 83.3% 20 / 24 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 3 totaltotal 66.6% 26 / 39 CC 2 SCAR 4.2
CC
2
Cov
78%
new
2.1
num_cores
2.0
get_socket_type
2.0
CRAP 1.5
« lib/Rex/Helper/File/Stat/Unix.pm ↑ Summary lib/Rex/Helper/URI.pm »
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4  
5 package Rex::Inventory::DMIDecode::CPU;
6  
7 40 ▶use v5.14.4;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 40 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 40 our $VERSION = '1.16.1'; # VERSION
11  
12 40 ▶use Rex::Inventory::DMIDecode::Section;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 40 ▶use base qw(Rex::Inventory::DMIDecode::Section);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 40 __PACKAGE__->section("Processor Information");
16  
17 40 __PACKAGE__->has(
18 [
19 'Max Speed', 'Serial Number', 'Family', 'Core Enabled',
20 'Version', 'Status', 'Upgrade', 'Thread Count',
21 ],
22 1
23 ); # is_array 1
24  
25 3 ▶sub new {
Subroutine new: called CC=2 SCAR=7.2
Pod undocumented
26 3 my $that = shift;
27 3 ▶ my $proto = ref($that) || $that;
Condition33%1/3
ref $that || $that
l!l&&r!l&&!r
030
MC/DC0%0/2
ref $that || $that
ref $that $that
Truth table33%1/3
A || B
A= ref $thatB= $that
ABresult
1X1
011
000
28 3 my $self = $that->SUPER::new(@_);
29  
30 3 bless( $self, $proto );
31  
32 3 return $self;
33 }
34  
35 0 ▶sub num_cores {
Subroutine num_cores: not called CC=1 SCAR=6.9
Pod undocumented
36 0 my ($self) = @_;
37 0 return $self->get_core_enabled;
38 }
39  
40 0 ▶sub get_socket_type {
Subroutine get_socket_type: not called CC=1 SCAR=6.9
Pod undocumented
41 0 my ($self) = @_;
42 0 return $self->get_upgrade;
43 }
44  
45 40 1;
« lib/Rex/Helper/File/Stat/Unix.pm ↑ Summary lib/Rex/Helper/URI.pm »