| 1 | package Bencher::Formatter::CodeStartup; | ||||||||||||||||||||||||||||||||||||||||
| 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 | |||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | use parent qw(Bencher::Formatter); | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use Role::Tiny::With; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | with 'Bencher::Role::FieldMunger'; | |||||||||||||||||||||||||||||||||||||||
| 11 | 1 | with 'Bencher::Role::ResultMunger'; | |||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | ▶ | use Bencher::Backend; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 14 | 1 | ▶ | use List::Util qw(first); | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||
| 16 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||||||||||||||||||||||||||||||||
| 17 | 1 | our $DATE = '2023-07-08'; # DATE | |||||||||||||||||||||||||||||||||||||||
| 18 | 1 | our $DIST = 'Bencher-Backend'; # DIST | |||||||||||||||||||||||||||||||||||||||
| 19 | 1 | our $VERSION = '1.063'; # VERSION | |||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||
| 21 | 0 | ▶ | sub munge_result { | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
munge_result: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | my ($self, $envres) = @_; | |||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | ▶ | return unless $envres->[3]{'func.code_startup'}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | return unless @{$envres->[2]}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||
| 27 | $self->add_field( | ||||||||||||||||||||||||||||||||||||||||
| 28 | $envres, | ||||||||||||||||||||||||||||||||||||||||
| 29 | 'code_overhead_time', | ||||||||||||||||||||||||||||||||||||||||
| 30 | {after=>'time', unit_of=>'time', align=>'number'}, | ||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | ▶ | sub { | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | for my $rit (@{$envres->[2]}) { | |||||||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | my $rit_baseline = first { | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||||||||||
| 34 | ($_->{participant} // '') eq 'perl -e1 (baseline)' && | ||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | ($_->{perl} // '') eq ($rit->{perl} // '') | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$_->{"participant"} // ""
$_->{"perl"} // ""
$rit->{"perl"} // ""
MC/DC0%0/1
$_->{"participant"} // ""
$_->{"participant"}
MC/DC0%0/1
$_->{"perl"} // ""
$_->{"perl"}
MC/DC0%0/1
$rit->{"perl"} // ""
$rit->{"perl"}
Truth table0%0/2
A
A= $_->{"participant"}
Truth table0%0/2
A
A= $_->{"perl"}
Truth table0%0/2
A
A= $rit->{"perl"}
| |||||||||||||||||||||||||||||||||||||||||
| 36 | 0 | } @{ $envres->[2] }; | |||||||||||||||||||||||||||||||||||||||
| 37 | 0 | ▶ | next unless $rit_baseline; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||
| 39 | $rit->{code_overhead_time} = | ||||||||||||||||||||||||||||||||||||||||
| 40 | 0 | $rit->{time} - $rit_baseline->{time}; | |||||||||||||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||||||||||||||
| 42 | }, | ||||||||||||||||||||||||||||||||||||||||
| 43 | 0 | ); | |||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | $self->delete_fields( | |||||||||||||||||||||||||||||||||||||||
| 46 | $envres, | ||||||||||||||||||||||||||||||||||||||||
| 47 | 'dataset', | ||||||||||||||||||||||||||||||||||||||||
| 48 | 'rate', | ||||||||||||||||||||||||||||||||||||||||
| 49 | ); | ||||||||||||||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||
| 52 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||
| 53 | # ABSTRACT: Munge code_startup results | ||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||
| 55 | __END__ | ||||||||||||||||||||||||||||||||||||||||