Bencher/Formatter/ScaleRate.pm

filter: Statementstmt 68.9% 20 / 29 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 60.9% 25 / 41 CC 4 SCAR 22.5
CC
4
Cov
61%
munge_result
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 9.4
« Bencher/Formatter/ModuleStartup.pm ↑ Summary Benchmark/Dumb/SimpleTime.pm »
1 package Bencher::Formatter::ScaleRate;
2  
3 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 #use Log::Any::IfLOG '$log';
7  
8 1 ▶use parent qw(Bencher::Formatter);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use Role::Tiny::With;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 with 'Bencher::Role::ResultMunger';
12  
13 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
14 1 our $DATE = '2023-07-08'; # DATE
15 1 our $DIST = 'Bencher-Backend'; # DIST
16 1 our $VERSION = '1.063'; # VERSION
17  
18 0 ▶sub munge_result {
Subroutine munge_result: not called CC=4 SCAR=30.0
Pod undocumented
19 0 my ($self, $envres) = @_;
20  
21 0 ▶ $envres->[3]{'table.field_units'} //= [];
Condition0%0/2
$envres->[3]{"table.field_units"} //= []
l!l
00
MC/DC0%0/1
$envres->[3]{"table.field_units"} //= []
$envres->[3]{"table.field_units"}
Truth table0%0/2
A
A= $envres->[3]{"table.field_units"}
Aresult
11
00
22 0 my $fus = $envres->[3]{'table.field_units'};
23  
24 0 my $i = -1;
25 0 for my $f (@{$envres->[3]{'table.fields'}}) {
26 0 $i++;
27 0 ▶ if ($f =~ /\A(rate)\z/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($f =~ /\A(rate)\z/) 0 0 0
28 0 $fus->[$i] = "/s";
29 }
30 }
31 }
32  
33 1 1;
34 # ABSTRACT: Scale rate to make it convenient
35  
36 __END__
« Bencher/Formatter/ModuleStartup.pm ↑ Summary Benchmark/Dumb/SimpleTime.pm »