Filename | /home/micha/.plenv/versions/5.38.2/lib/perl5/site_perl/5.38.2/Test2/Hub/Subtest.pm |
Statements | Executed 22 statements in 379µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 10µs | 11µs | BEGIN@2 | Test2::Hub::Subtest::
1 | 1 | 1 | 9µs | 19µs | BEGIN@66 | Test2::Hub::Subtest::
1 | 1 | 1 | 7µs | 20µs | BEGIN@24 | Test2::Hub::Subtest::
1 | 1 | 1 | 6µs | 6µs | BEGIN@7 | Test2::Hub::Subtest::
1 | 1 | 1 | 4µs | 16µs | BEGIN@47 | Test2::Hub::Subtest::
1 | 1 | 1 | 4µs | 76µs | BEGIN@8 | Test2::Hub::Subtest::
1 | 1 | 1 | 4µs | 20µs | BEGIN@9 | Test2::Hub::Subtest::
1 | 1 | 1 | 3µs | 20µs | BEGIN@3 | Test2::Hub::Subtest::
0 | 0 | 0 | 0s | 0s | inherit | Test2::Hub::Subtest::
0 | 0 | 0 | 0s | 0s | is_subtest | Test2::Hub::Subtest::
0 | 0 | 0 | 0s | 0s | send | Test2::Hub::Subtest::
0 | 0 | 0 | 0s | 0s | terminate | Test2::Hub::Subtest::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Test2::Hub::Subtest; | ||||
2 | 2 | 18µs | 2 | 12µs | # spent 11µs (10+1) within Test2::Hub::Subtest::BEGIN@2 which was called:
# once (10µs+1µs) by Test2::API::BEGIN@88 at line 2 # spent 11µs making 1 call to Test2::Hub::Subtest::BEGIN@2
# spent 2µs making 1 call to strict::import |
3 | 2 | 35µs | 2 | 37µs | # spent 20µs (3+17) within Test2::Hub::Subtest::BEGIN@3 which was called:
# once (3µs+17µs) by Test2::API::BEGIN@88 at line 3 # spent 20µs making 1 call to Test2::Hub::Subtest::BEGIN@3
# spent 17µs making 1 call to warnings::import |
4 | |||||
5 | 1 | 300ns | our $VERSION = '1.302198'; | ||
6 | |||||
7 | 2 | 26µs | 1 | 6µs | # spent 6µs within Test2::Hub::Subtest::BEGIN@7 which was called:
# once (6µs+0s) by Test2::API::BEGIN@88 at line 7 # spent 6µs making 1 call to Test2::Hub::Subtest::BEGIN@7 |
8 | 2 | 22µs | 2 | 148µs | # spent 76µs (4+72) within Test2::Hub::Subtest::BEGIN@8 which was called:
# once (4µs+72µs) by Test2::API::BEGIN@88 at line 8 # spent 76µs making 1 call to Test2::Hub::Subtest::BEGIN@8
# spent 72µs making 1 call to Test2::Util::HashBase::import |
9 | 2 | 62µs | 2 | 35µs | # spent 20µs (4+16) within Test2::Hub::Subtest::BEGIN@9 which was called:
# once (4µs+16µs) by Test2::API::BEGIN@88 at line 9 # spent 20µs making 1 call to Test2::Hub::Subtest::BEGIN@9
# spent 16µs making 1 call to Exporter::import |
10 | |||||
11 | sub is_subtest { 1 } | ||||
12 | |||||
13 | sub inherit { | ||||
14 | my $self = shift; | ||||
15 | my ($from) = @_; | ||||
16 | |||||
17 | $self->SUPER::inherit($from); | ||||
18 | |||||
19 | $self->{+NESTED} = $from->nested + 1; | ||||
20 | } | ||||
21 | |||||
22 | { | ||||
23 | # Legacy | ||||
24 | 3 | 85µs | 2 | 32µs | # spent 20µs (7+13) within Test2::Hub::Subtest::BEGIN@24 which was called:
# once (7µs+13µs) by Test2::API::BEGIN@88 at line 24 # spent 20µs making 1 call to Test2::Hub::Subtest::BEGIN@24
# spent 13µs making 1 call to warnings::unimport |
25 | 1 | 1µs | *ID = \&Test2::Hub::HID; | ||
26 | 1 | 200ns | *id = \&Test2::Hub::hid; | ||
27 | 1 | 200ns | *set_id = \&Test2::Hub::set_hid; | ||
28 | } | ||||
29 | |||||
30 | sub send { | ||||
31 | my $self = shift; | ||||
32 | my ($e) = @_; | ||||
33 | |||||
34 | my $out = $self->SUPER::send($e); | ||||
35 | |||||
36 | return $out if $self->{+MANUAL_SKIP_ALL}; | ||||
37 | |||||
38 | my $f = $e->facet_data; | ||||
39 | |||||
40 | my $plan = $f->{plan} or return $out; | ||||
41 | return $out unless $plan->{skip}; | ||||
42 | |||||
43 | my $trace = $f->{trace} or die "Missing Trace!"; | ||||
44 | return $out unless $trace->{pid} != $self->pid | ||||
45 | || $trace->{tid} != $self->tid; | ||||
46 | |||||
47 | 2 | 87µs | 2 | 28µs | # spent 16µs (4+12) within Test2::Hub::Subtest::BEGIN@47 which was called:
# once (4µs+12µs) by Test2::API::BEGIN@88 at line 47 # spent 16µs making 1 call to Test2::Hub::Subtest::BEGIN@47
# spent 12µs making 1 call to warnings::unimport |
48 | last T2_SUBTEST_WRAPPER; | ||||
49 | } | ||||
50 | |||||
51 | sub terminate { | ||||
52 | my $self = shift; | ||||
53 | my ($code, $e, $f) = @_; | ||||
54 | $self->set_exit_code($code); | ||||
55 | |||||
56 | return if $self->{+MANUAL_SKIP_ALL}; | ||||
57 | |||||
58 | $f ||= $e->facet_data; | ||||
59 | |||||
60 | if(my $plan = $f->{plan}) { | ||||
61 | my $trace = $f->{trace} or die "Missing Trace!"; | ||||
62 | return if $plan->{skip} | ||||
63 | && ($trace->{pid} != $$ || $trace->{tid} != get_tid); | ||||
64 | } | ||||
65 | |||||
66 | 2 | 38µs | 2 | 30µs | # spent 19µs (9+11) within Test2::Hub::Subtest::BEGIN@66 which was called:
# once (9µs+11µs) by Test2::API::BEGIN@88 at line 66 # spent 19µs making 1 call to Test2::Hub::Subtest::BEGIN@66
# spent 11µs making 1 call to warnings::unimport |
67 | last T2_SUBTEST_WRAPPER; | ||||
68 | } | ||||
69 | |||||
70 | 1 | 3µs | 1; | ||
71 | |||||
72 | __END__ |