Profile of Test/Builder/Formatter.pm

← Index
NYTProf Performance Profile «line view»
For t/bug-md-11.t
Run on Fri Mar 8 13:27:24 2024
Reported on Fri Mar 8 13:30:23 2024

Filename | /home/micha/.plenv/versions/5.38.2/lib/perl5/site_perl/5.38.2/Test/Builder/Formatter.pm
Statements | Executed 20 statements in 391µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 1.78ms | 2.16ms | Test::Builder::Formatter::::BEGIN@7Test::Builder::Formatter::BEGIN@7
1 | 1 | 1 | 18µs | 20µs | Test::Builder::Formatter::::BEGIN@11Test::Builder::Formatter::BEGIN@11
1 | 1 | 1 | 9µs | 11µs | Test::Builder::Formatter::::BEGIN@2Test::Builder::Formatter::BEGIN@2
1 | 1 | 1 | 5µs | 51µs | Test::Builder::Formatter::::BEGIN@9Test::Builder::Formatter::BEGIN@9
1 | 1 | 1 | 5µs | 9µs | Test::Builder::Formatter::::plan_tapTest::Builder::Formatter::plan_tap
1 | 1 | 1 | 4µs | 20µs | Test::Builder::Formatter::::BEGIN@3Test::Builder::Formatter::BEGIN@3
1 | 1 | 1 | 3µs | 86µs | Test::Builder::Formatter::::initTest::Builder::Formatter::init
0 | 0 | 0 | 0s | 0s | Test::Builder::Formatter::::__ANON__[:16]Test::Builder::Formatter::__ANON__[:16]
0 | 0 | 0 | 0s | 0s | Test::Builder::Formatter::::debug_tapTest::Builder::Formatter::debug_tap
0 | 0 | 0 | 0s | 0s | Test::Builder::Formatter::::info_tapTest::Builder::Formatter::info_tap
0 | 0 | 0 | 0s | 0s | Test::Builder::Formatter::::no_subtest_spaceTest::Builder::Formatter::no_subtest_space
0 | 0 | 0 | 0s | 0s | Test::Builder::Formatter::::redirectTest::Builder::Formatter::redirect

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package Test::Builder::Formatter;
2 | 2 | 18µs | 2 | 13µs | # spent 11µs (9+2) within Test::Builder::Formatter::BEGIN@2 which was called: # once (9µs+2µs) by Test::Builder::BEGIN@36 at line 2 use strict; # spent 11µs making 1 call to Test::Builder::Formatter::BEGIN@2 # spent 2µs making 1 call to strict::import
3 | 2 | 33µs | 2 | 37µs | # spent 20µs (4+17) within Test::Builder::Formatter::BEGIN@3 which was called: # once (4µs+17µs) by Test::Builder::BEGIN@36 at line 3 use warnings; # spent 20µs making 1 call to Test::Builder::Formatter::BEGIN@3 # spent 17µs making 1 call to warnings::import
4 |  |  |  |  |
5 | 1 | 200ns |  |  | our $VERSION = '1.302198';
6 |  |  |  |  |
7 | 2 | 80µs | 1 | 2.16ms | # spent 2.16ms (1.78+384µs) within Test::Builder::Formatter::BEGIN@7 which was called: # once (1.78ms+384µs) by Test::Builder::BEGIN@36 at line 7 BEGIN { require Test2::Formatter::TAP; our @ISA = qw(Test2::Formatter::TAP) } # spent 2.16ms making 1 call to Test::Builder::Formatter::BEGIN@7
8 |  |  |  |  |
9 | 2 | 48µs | 2 | 97µs | # spent 51µs (5+46) within Test::Builder::Formatter::BEGIN@9 which was called: # once (5µs+46µs) by Test::Builder::BEGIN@36 at line 9 use Test2::Util::HashBase qw/no_header no_diag/; # spent 51µs making 1 call to Test::Builder::Formatter::BEGIN@9 # spent 46µs making 1 call to Test2::Util::HashBase::import
10 |  |  |  |  |
11 |  |  |  |  | # spent 20µs (18+2) within Test::Builder::Formatter::BEGIN@11 which was called: # once (18µs+2µs) by Test::Builder::BEGIN@36 at line 17 BEGIN {
12 | 1 | 5µs | 1 | 900ns | *OUT_STD = Test2::Formatter::TAP->can('OUT_STD'); # spent 900ns making 1 call to UNIVERSAL::can
13 | 1 | 7µs | 1 | 500ns | *OUT_ERR = Test2::Formatter::TAP->can('OUT_ERR'); # spent 500ns making 1 call to UNIVERSAL::can
14 |  |  |  |  |
15 | 1 | 3µs | 1 | 300ns | my $todo = OUT_ERR() + 1; # spent 300ns making 1 call to Test2::Formatter::TAP::OUT_ERR
16 | 1 | 5µs |  |  | *OUT_TODO = sub() { $todo };
17 | 1 | 182µs | 1 | 20µs | } # spent 20µs making 1 call to Test::Builder::Formatter::BEGIN@11
18 |  |  |  |  |
19 |  |  |  |  | # spent 86µs (3+82) within Test::Builder::Formatter::init which was called: # once (3µs+82µs) by Test2::Util::HashBase::_new at line 155 of Test2/Util/HashBase.pm sub init {
20 | 1 | 100ns |  |  | my $self = shift;
21 | 1 | 1µs | 1 | 82µs | $self->SUPER::init(@_); # spent 82µs making 1 call to Test2::Formatter::TAP::init
22 | 1 | 2µs |  |  | $self->{+HANDLES}->[OUT_TODO] = $self->{+HANDLES}->[OUT_STD];
23 |  |  |  |  | }
24 |  |  |  |  |
25 |  |  |  |  | # spent 9µs (5+4) within Test::Builder::Formatter::plan_tap which was called: # once (5µs+4µs) by Test2::Formatter::TAP::event_tap at line 169 of Test2/Formatter/TAP.pm sub plan_tap {
26 | 1 | 300ns |  |  | my ($self, $f) = @_;
27 |  |  |  |  |
28 | 1 | 400ns |  |  | return if $self->{+NO_HEADER};
29 | 1 | 4µs | 1 | 4µs | return $self->SUPER::plan_tap($f); # spent 4µs making 1 call to Test2::Formatter::TAP::plan_tap
30 |  |  |  |  | }
31 |  |  |  |  |
32 |  |  |  |  | sub debug_tap {
33 |  |  |  |  | my ($self, $f, $num) = @_;
34 |  |  |  |  | return if $self->{+NO_DIAG};
35 |  |  |  |  | my @out = $self->SUPER::debug_tap($f, $num);
36 |  |  |  |  | $self->redirect(\@out) if @out && ref $f->{about} && defined $f->{about}->{package}
37 |  |  |  |  | && $f->{about}->{package} eq 'Test::Builder::TodoDiag';
38 |  |  |  |  | return @out;
39 |  |  |  |  | }
40 |  |  |  |  |
41 |  |  |  |  | sub info_tap {
42 |  |  |  |  | my ($self, $f) = @_;
43 |  |  |  |  | return if $self->{+NO_DIAG};
44 |  |  |  |  | my @out = $self->SUPER::info_tap($f);
45 |  |  |  |  | $self->redirect(\@out) if @out && ref $f->{about} && defined $f->{about}->{package}
46 |  |  |  |  | && $f->{about}->{package} eq 'Test::Builder::TodoDiag';
47 |  |  |  |  | return @out;
48 |  |  |  |  | }
49 |  |  |  |  |
50 |  |  |  |  | sub redirect {
51 |  |  |  |  | my ($self, $out) = @_;
52 |  |  |  |  | $_->[0] = OUT_TODO for @$out;
53 |  |  |  |  | }
54 |  |  |  |  |
55 |  |  |  |  | sub no_subtest_space { 1 }
56 |  |  |  |  |
57 | 1 | 2µs |  |  | 1;
58 |  |  |  |  |
59 |  |  |  |  | __END__