MooseFS/ChunkInfo.pm

filter: Statementstmt 50.0% 14 / 28 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 1 totaltotal 39.1% 18 / 46 CC 5 SCAR 27.5
CC
5
Cov
39%
BUILD
30.0
__ANON__
2.0
BEGIN
1.0
CRAP 15.6
« MooseFS/Exports.pm ↑ Summary
1 package MooseFS::ChunkInfo;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use IO::Socket::INET;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 extends 'MooseFS';
8  
9 0 ▶sub BUILD {
Subroutine BUILD: not called CC=5 SCAR=34.0
Pod undocumented
10 0 my $self = shift;
11 0 my $s = $self->sock;
12 0 print $s pack('(LL)>', 514, 0);
13 0 my $header = $self->myrecv($s, 8);
14 0 my ($cmd, $length) = unpack('(LL)>', $header);
15 0 ▶ if ( $cmd == 515 and $length == 52 or $length == 76 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($cmd == 515 and $length == 52 or $length == 76) 0 0 0
Condition0%0/6
$cmd == 515 and $length == 52 or $length == 76
l!l&&r!l&&!r
000
$cmd == 515 and $length == 52
!ll&&!rl&&r
000
MC/DC0%0/3
$cmd == 515 and $length == 52 or $length == 76
$cmd == 515 $length == 52 $length == 76
Truth table0%0/5
A and B or C
A= $cmd == 515B= $length == 52C= $length == 76
ABCresult
11X1
0X11
1011
0X00
1000
16 0 my $data = $self->myrecv($s, $length);
17 0 my $d = substr($data, 0, 52);
18 0 my ($loopstart, $loopend, $del_invalid, $ndel_invalid, $del_unused, $ndel_unused, $del_dclean, $ndel_dclean, $del_ogoal, $ndel_ogoal, $rep_ugoal, $nrep_ugoal, $rebalance) = unpack('(LLLLLLLLLLLLL)>', $d);
19 0 $self->info({
20 loop_start => $loopstart,
21 loop_end => $loopend,
22 invalid_deletions => $del_invalid,
23 invalid_deletions_out_of => $del_invalid+$ndel_invalid,
24 unused_deletions => $del_unused,
25 unused_deletions_out_of => $del_unused+$ndel_unused,
26 disk_clean_deletions => $del_dclean,
27 disk_clean_deletions_out_of => $del_dclean+$ndel_dclean,
28 over_goal_deletions => $del_ogoal,
29 over_goal_deletions_out_of => $del_ogoal+$ndel_ogoal,
30 replications_under_goal => $rep_ugoal,
31 replications_under_goal_out_of => $rep_ugoal+$nrep_ugoal,
32 replocations_rebalance => $rebalance,
33 });
34 }
35 0 for my $key ( keys %{ $self->info } ) {
36 0 ▶ has $key => (is => 'ro', lazy => 1, default => sub {$self->info->{$key}} );
Subroutine __ANON__: not called CC=1 SCAR=6.9
37 };
38 }
39  
40 1 1;
« MooseFS/Exports.pm ↑ Summary