lib/Rex/Inventory/SMBios/CPU.pm

filter: Statementstmt 62.0% 18 / 29 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 62.5% 5 / 8 Podpod 0.0% 0 / 3 totaltotal 51.1% 23 / 45 CC 2 SCAR 8.5
CC
2
Cov
56%
new
6.0
num_cores
2.0
get_socket_type
2.0
CRAP 2.3
« lib/Rex/Pkg/SunOS/OpenCSW.pm ↑ Summary blib/lib/Rex/Require.pm »
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4  
5 package Rex::Inventory::SMBios::CPU;
6  
7 39 ▶use v5.14.4;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 39 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 39 our $VERSION = '1.16.1'; # VERSION
11  
12 39 ▶use Rex::Inventory::SMBios::Section;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 39 ▶use Rex::Logger;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 39 ▶use base qw(Rex::Inventory::SMBios::Section);
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 39 __PACKAGE__->section("processor");
17  
18 39 __PACKAGE__->has(
19 [
20 { key => 'Max Speed', from => "Maximum Speed" },
21 'Family',
22 { key => 'Status', from => "Processor Status" },
23 ],
24 1
25 ); # is_array 1
26  
27 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
28 0 my $that = shift;
29 0 ▶ my $proto = ref($that) || $that;
Condition0%0/3
ref $that || $that
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $that || $that
ref $that $that
Truth table0%0/3
A || B
A= ref $thatB= $that
ABresult
1X1
011
000
30 0 my $self = $that->SUPER::new(@_);
31  
32 0 bless( $self, $proto );
33  
34 0 return $self;
35 }
36  
37 0 ▶sub num_cores {
Subroutine num_cores: not called CC=1 SCAR=6.9
Pod undocumented
38 0 my ($self) = @_;
39 0 Rex::Logger::debug("num_cores not supported");
40 0 return -1;
41 }
42  
43 0 ▶sub get_socket_type {
Subroutine get_socket_type: not called CC=1 SCAR=6.9
Pod undocumented
44 0 my ($self) = @_;
45 0 Rex::Logger::debug("get_socket_type not supported");
46 0 return;
47 }
48  
49 39 1;
« lib/Rex/Pkg/SunOS/OpenCSW.pm ↑ Summary blib/lib/Rex/Require.pm »