Filename | /home/micha/.plenv/versions/5.38.2/lib/perl5/site_perl/5.38.2/Test2/Event/Pass.pm |
Statements | Executed 13 statements in 287µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 23µs | 23µs | BEGIN@7 | Test2::Event::Pass::
1 | 1 | 1 | 11µs | 12µs | BEGIN@2 | Test2::Event::Pass::
1 | 1 | 1 | 8µs | 8µs | BEGIN@9 | Test2::Event::Pass::
1 | 1 | 1 | 4µs | 57µs | BEGIN@15 | Test2::Event::Pass::
1 | 1 | 1 | 4µs | 20µs | BEGIN@3 | Test2::Event::Pass::
1 | 1 | 1 | 400ns | 400ns | __ANON__ (xsub) | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | add_info | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | causes_fail | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | diagnostics | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | facet_data | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | global | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | increments_count | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | no_display | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | sets_plan | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | subtest_id | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | summary | Test2::Event::Pass::
0 | 0 | 0 | 0s | 0s | terminate | Test2::Event::Pass::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Test2::Event::Pass; | ||||
2 | 2 | 21µs | 2 | 14µs | # spent 12µs (11+2) within Test2::Event::Pass::BEGIN@2 which was called:
# once (11µs+2µs) by Test::Builder::BEGIN@18 at line 2 # spent 12µs making 1 call to Test2::Event::Pass::BEGIN@2
# spent 2µs making 1 call to strict::import |
3 | 2 | 27µs | 2 | 37µs | # spent 20µs (4+16) within Test2::Event::Pass::BEGIN@3 which was called:
# once (4µs+16µs) by Test::Builder::BEGIN@18 at line 3 # spent 20µs making 1 call to Test2::Event::Pass::BEGIN@3
# spent 16µs making 1 call to warnings::import |
4 | |||||
5 | 1 | 300ns | our $VERSION = '1.302198'; | ||
6 | |||||
7 | 2 | 55µs | 2 | 23µs | # spent 23µs (23+400ns) within Test2::Event::Pass::BEGIN@7 which was called:
# once (23µs+400ns) by Test::Builder::BEGIN@18 at line 7 # spent 23µs making 1 call to Test2::Event::Pass::BEGIN@7
# spent 400ns making 1 call to Test2::Event::Pass::__ANON__ |
8 | |||||
9 | # spent 8µs within Test2::Event::Pass::BEGIN@9 which was called:
# once (8µs+0s) by Test::Builder::BEGIN@18 at line 13 | ||||
10 | 1 | 300ns | require Test2::Event; | ||
11 | 1 | 5µs | our @ISA = qw(Test2::Event); | ||
12 | 1 | 3µs | *META_KEY = \&Test2::Util::ExternalMeta::META_KEY; | ||
13 | 1 | 16µs | 1 | 8µs | } # spent 8µs making 1 call to Test2::Event::Pass::BEGIN@9 |
14 | |||||
15 | 2 | 159µs | 2 | 110µs | # spent 57µs (4+53) within Test2::Event::Pass::BEGIN@15 which was called:
# once (4µs+53µs) by Test::Builder::BEGIN@18 at line 15 # spent 57µs making 1 call to Test2::Event::Pass::BEGIN@15
# spent 53µs making 1 call to Test2::Util::HashBase::import |
16 | |||||
17 | ############## | ||||
18 | # Old API | ||||
19 | sub summary { "pass" } | ||||
20 | sub increments_count { 1 } | ||||
21 | sub causes_fail { 0 } | ||||
22 | sub diagnostics { 0 } | ||||
23 | sub no_display { 0 } | ||||
24 | sub subtest_id { undef } | ||||
25 | sub terminate { () } | ||||
26 | sub global { () } | ||||
27 | sub sets_plan { () } | ||||
28 | |||||
29 | ############## | ||||
30 | # New API | ||||
31 | |||||
32 | sub add_info { | ||||
33 | my $self = shift; | ||||
34 | |||||
35 | for my $in (@_) { | ||||
36 | $in = {%$in} if ref($in) ne 'ARRAY'; | ||||
37 | $in = Test2::EventFacet::Info->new($in); | ||||
38 | |||||
39 | push @{$self->{+INFO}} => $in; | ||||
40 | } | ||||
41 | } | ||||
42 | |||||
43 | sub facet_data { | ||||
44 | my $self = shift; | ||||
45 | |||||
46 | my $out = $self->common_facet_data; | ||||
47 | |||||
48 | $out->{about}->{details} = 'pass'; | ||||
49 | |||||
50 | $out->{assert} = {pass => 1, details => $self->{+NAME}}; | ||||
51 | |||||
52 | $out->{info} = [map {{ %{$_} }} @{$self->{+INFO}}] if $self->{+INFO}; | ||||
53 | |||||
54 | return $out; | ||||
55 | } | ||||
56 | |||||
57 | 1 | 2µs | 1; | ||
58 | |||||
59 | __END__ | ||||
# spent 400ns within Test2::Event::Pass::__ANON__ which was called:
# once (400ns+0s) by Test2::Event::Pass::BEGIN@7 at line 7 |