| 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 | Test2::Event::Pass::BEGIN@7 |
| 1 | 1 | 1 | 11µs | 12µs | Test2::Event::Pass::BEGIN@2 |
| 1 | 1 | 1 | 8µs | 8µs | Test2::Event::Pass::BEGIN@9 |
| 1 | 1 | 1 | 4µs | 57µs | Test2::Event::Pass::BEGIN@15 |
| 1 | 1 | 1 | 4µs | 20µs | Test2::Event::Pass::BEGIN@3 |
| 1 | 1 | 1 | 400ns | 400ns | Test2::Event::Pass::__ANON__ (xsub) |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::add_info |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::causes_fail |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::diagnostics |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::facet_data |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::global |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::increments_count |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::no_display |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::sets_plan |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::subtest_id |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::summary |
| 0 | 0 | 0 | 0s | 0s | Test2::Event::Pass::terminate |
| 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 |