← 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/Test2/Event/Fail.pm
StatementsExecuted 13 statements in 291µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11111µs12µsTest2::Event::Fail::::BEGIN@2Test2::Event::Fail::BEGIN@2
1118µs8µsTest2::Event::Fail::::BEGIN@9Test2::Event::Fail::BEGIN@9
1116µs7µsTest2::Event::Fail::::BEGIN@7Test2::Event::Fail::BEGIN@7
1114µs57µsTest2::Event::Fail::::BEGIN@15Test2::Event::Fail::BEGIN@15
1114µs20µsTest2::Event::Fail::::BEGIN@3Test2::Event::Fail::BEGIN@3
111400ns400nsTest2::Event::Fail::::__ANON__Test2::Event::Fail::__ANON__ (xsub)
0000s0sTest2::Event::Fail::::add_infoTest2::Event::Fail::add_info
0000s0sTest2::Event::Fail::::causes_failTest2::Event::Fail::causes_fail
0000s0sTest2::Event::Fail::::diagnosticsTest2::Event::Fail::diagnostics
0000s0sTest2::Event::Fail::::facet_dataTest2::Event::Fail::facet_data
0000s0sTest2::Event::Fail::::globalTest2::Event::Fail::global
0000s0sTest2::Event::Fail::::increments_countTest2::Event::Fail::increments_count
0000s0sTest2::Event::Fail::::no_displayTest2::Event::Fail::no_display
0000s0sTest2::Event::Fail::::sets_planTest2::Event::Fail::sets_plan
0000s0sTest2::Event::Fail::::subtest_idTest2::Event::Fail::subtest_id
0000s0sTest2::Event::Fail::::summaryTest2::Event::Fail::summary
0000s0sTest2::Event::Fail::::terminateTest2::Event::Fail::terminate
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Test2::Event::Fail;
2220µs214µs
# spent 12µs (11+2) within Test2::Event::Fail::BEGIN@2 which was called: # once (11µs+2µs) by Test::Builder::BEGIN@18 at line 2
use strict;
# spent 12µs making 1 call to Test2::Event::Fail::BEGIN@2 # spent 2µs making 1 call to strict::import
3222µs237µs
# spent 20µs (4+17) within Test2::Event::Fail::BEGIN@3 which was called: # once (4µs+17µs) by Test::Builder::BEGIN@18 at line 3
use warnings;
# spent 20µs making 1 call to Test2::Event::Fail::BEGIN@3 # spent 17µs making 1 call to warnings::import
4
51300nsour $VERSION = '1.302198';
6
7241µs27µs
# spent 7µs (6+400ns) within Test2::Event::Fail::BEGIN@7 which was called: # once (6µs+400ns) by Test::Builder::BEGIN@18 at line 7
use Test2::EventFacet::Info;
# spent 7µs making 1 call to Test2::Event::Fail::BEGIN@7 # spent 400ns making 1 call to Test2::Event::Fail::__ANON__
8
9
# spent 8µs within Test2::Event::Fail::BEGIN@9 which was called: # once (8µs+0s) by Test::Builder::BEGIN@18 at line 13
BEGIN {
101400ns require Test2::Event;
1116µs our @ISA = qw(Test2::Event);
1213µs *META_KEY = \&Test2::Util::ExternalMeta::META_KEY;
13115µs18µs}
# spent 8µs making 1 call to Test2::Event::Fail::BEGIN@9
14
152181µs2111µs
# spent 57µs (4+53) within Test2::Event::Fail::BEGIN@15 which was called: # once (4µs+53µs) by Test::Builder::BEGIN@18 at line 15
use Test2::Util::HashBase qw{ -name -info };
# spent 57µs making 1 call to Test2::Event::Fail::BEGIN@15 # spent 53µs making 1 call to Test2::Util::HashBase::import
16
17#############
18# Old API
19sub summary { "fail" }
20sub increments_count { 1 }
21sub diagnostics { 0 }
22sub no_display { 0 }
23sub subtest_id { undef }
24sub terminate { () }
25sub global { () }
26sub sets_plan { () }
27
28sub causes_fail {
29 my $self = shift;
30 return 0 if $self->{+AMNESTY} && @{$self->{+AMNESTY}};
31 return 1;
32}
33
34#############
35# New API
36
37sub add_info {
38 my $self = shift;
39
40 for my $in (@_) {
41 $in = {%$in} if ref($in) ne 'ARRAY';
42 $in = Test2::EventFacet::Info->new($in);
43
44 push @{$self->{+INFO}} => $in;
45 }
46}
47
48sub facet_data {
49 my $self = shift;
50 my $out = $self->common_facet_data;
51
52 $out->{about}->{details} = 'fail';
53
54 $out->{assert} = {pass => 0, details => $self->{+NAME}};
55
56 $out->{info} = [map {{ %{$_} }} @{$self->{+INFO}}] if $self->{+INFO};
57
58 return $out;
59}
60
6112µs1;
62
63__END__
 
# spent 400ns within Test2::Event::Fail::__ANON__ which was called: # once (400ns+0s) by Test2::Event::Fail::BEGIN@7 at line 7
sub Test2::Event::Fail::__ANON__; # xsub