Bencher/Formatter/DeleteConstantFields.pm

filter: Statementstmt 65.6% 21 / 32 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 57.7% 26 / 45 CC 5 SCAR 27.4
CC
5
Cov
55%
munge_result
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 15.5
« Bencher/Formatter/AddComparisonFields.pm ↑ Summary Bencher/Formatter/CodeStartup.pm »
1 package Bencher::Formatter::DeleteConstantFields;
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::FieldMunger';
12 1 with 'Bencher::Role::ResultMunger';
13  
14 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
15 1 our $DATE = '2023-07-08'; # DATE
16 1 our $DIST = 'Bencher-Backend'; # DIST
17 1 our $VERSION = '1.063'; # VERSION
18  
19 0 ▶sub munge_result {
Subroutine munge_result: not called CC=5 SCAR=34.0
Pod undocumented
20 0 my ($self, $envres) = @_;
21  
22 {
23 0 ▶ last unless @{$envres->[2]};
Branch: 1 branch
BranchTrueFalseTotal
unless @{$envres->[2];} 0 0 0
24 0 require Data::TableData::Object::aohos;
25 0 my $td = Data::TableData::Object::aohos->new($envres->[2]);
26 0 ▶ last unless $td->row_count >= 2;
Branch: 1 branch
BranchTrueFalseTotal
unless $td->row_count >= 2 0 0 0
27 0 my @const_cols = $td->const_col_names;
28 0 for my $k (@const_cols) {
29 0 ▶ next unless $k =~ /^(item_.+|arg_.+|perl|modver|participant|p_.+|dataset|ds_.+)$/;
Branch: 1 branch
BranchTrueFalseTotal
unless $k =~ /^(item_.+|arg_.+|perl|modver|participant|p_.+|dataset|ds_.+)$/ 0 0 0
30 0 $self->delete_fields($envres, $k);
31 }
32 }
33 }
34  
35 1 1;
36 # ABSTRACT: Delete constant item permutation fields to reduce clutter
37  
38 __END__
« Bencher/Formatter/AddComparisonFields.pm ↑ Summary Bencher/Formatter/CodeStartup.pm »