← 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/Exporter.pm
StatementsExecuted 1901 statements in 4.47ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
125124633.48ms4.71msExporter::::importExporter::import
17411.20ms1.27msExporter::::as_heavyExporter::as_heavy
122222µs88µsExporter::::exportExporter::export
11111µs12µsExporter::::BEGIN@3Exporter::BEGIN@3
3117µs1.20msExporter::::export_to_levelExporter::export_to_level
1114µs15µsExporter::::export_tagsExporter::export_tags
1114µs8µsExporter::::BEGIN@4Exporter::BEGIN@4
1113µs12µsExporter::::export_ok_tagsExporter::export_ok_tags
0000s0sExporter::::__ANON__[:61]Exporter::__ANON__[:61]
0000s0sExporter::::export_failExporter::export_fail
0000s0sExporter::::require_versionExporter::require_version
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Exporter;
2
3222µs214µs
# spent 12µs (11+2) within Exporter::BEGIN@3 which was called: # once (11µs+2µs) by Test::Builder::BEGIN@15 at line 3
use strict;
# spent 12µs making 1 call to Exporter::BEGIN@3 # spent 2µs making 1 call to strict::import
42402µs212µs
# spent 8µs (4+4) within Exporter::BEGIN@4 which was called: # once (4µs+4µs) by Test::Builder::BEGIN@15 at line 4
no strict 'refs';
# spent 8µs making 1 call to Exporter::BEGIN@4 # spent 4µs making 1 call to strict::unimport
5
61200nsour $Debug = 0;
71100nsour $ExportLevel = 0;
81100nsour $Verbose ||= 0;
91200nsour $VERSION = '5.78';
10our %Cache;
11
12
# spent 1.27ms (1.20+72µs) within Exporter::as_heavy which was called 17 times, avg 75µs/call: # 12 times (47µs+20µs) by Exporter::export at line 22, avg 6µs/call # 3 times (1.14ms+48µs) by Exporter::export_to_level at line 78, avg 396µs/call # once (8µs+3µs) by Exporter::export_tags at line 82 # once (6µs+2µs) by Exporter::export_ok_tags at line 86
sub as_heavy {
131760µs require Exporter::Heavy;
14 # Unfortunately, this does not work if the caller is aliased as *name = \&foo
15 # Thus the need to create a lot of identical subroutines
161726µs my $c = (caller(1))[3];
171756µs1732µs $c =~ s/.*:://;
# spent 32µs making 17 calls to CORE::subst, avg 2µs/call
181734µs \&{"Exporter::Heavy::heavy_$c"};
19}
20
21
# spent 88µs (22+66) within Exporter::export which was called 12 times, avg 7µs/call: # 9 times (17µs+55µs) by Exporter::import at line 59, avg 8µs/call # 3 times (5µs+11µs) by Exporter::Heavy::heavy_export_to_level at line 219 of Exporter/Heavy.pm, avg 5µs/call
sub export {
221229µs241.15ms goto &{as_heavy()};
# spent 1.08ms making 12 calls to Exporter::Heavy::heavy_export, avg 90µs/call # spent 66µs making 12 calls to Exporter::as_heavy, avg 6µs/call
23}
24
25
# spent 4.71ms (3.48+1.23) within Exporter::import which was called 125 times, avg 38µs/call: # 2 times (55µs+5µs) by OLE::Storage_Lite::BEGIN@831 or Test2::Hub::BEGIN@12 at line 39 of List/Util.pm, avg 30µs/call # once (527µs+31µs) by POSIX::import at line 192 of POSIX.pm # once (81µs+163µs) by Archive::Zip::Archive::BEGIN@21 at line 21 of Archive/Zip/Archive.pm # once (11µs+226µs) by Archive::Zip::Member::BEGIN@19 at line 19 of Archive/Zip/Member.pm # once (184µs+9µs) by POSIX::BEGIN@11 at line 11 of POSIX.pm # once (10µs+160µs) by Archive::Zip::ZipFileMember::BEGIN@11 at line 11 of Archive/Zip/ZipFileMember.pm # once (140µs+7µs) by OLE::Storage_Lite::PPS::Root::BEGIN@171 at line 171 of OLE/Storage_Lite.pm # once (12µs+129µs) by XML::Twig::BEGIN@1 at line 1 of (eval 14)[XML/Twig.pm:159] # once (112µs+7µs) by File::Temp::BEGIN@150 at line 150 of File/Temp.pm # once (10µs+108µs) by Archive::Zip::NewFileMember::BEGIN@11 at line 11 of Archive/Zip/NewFileMember.pm # once (80µs+5µs) by Test::Builder::Module::import at line 95 of Test/Builder/Module.pm # once (10µs+75µs) by Archive::Zip::StringMember::BEGIN@11 at line 11 of Archive/Zip/StringMember.pm # once (10µs+72µs) by Archive::Zip::DirectoryMember::BEGIN@13 at line 13 of Archive/Zip/DirectoryMember.pm # once (72µs+7µs) by Test::Builder::BEGIN@18 at line 18 of Test/Builder.pm # once (65µs+5µs) by Archive::Zip::BEGIN@12 at line 39 of FileHandle.pm # once (66µs+3µs) by Archive::Zip::BEGIN@7 at line 138 of IO/File.pm # once (63µs+4µs) by OLE::Storage_Lite::PPS::Root::BEGIN@169 at line 169 of OLE/Storage_Lite.pm # once (10µs+56µs) by Archive::Zip::FileMember::BEGIN@11 at line 11 of Archive/Zip/FileMember.pm # once (58µs+5µs) by Archive::Zip::Member::BEGIN@28 at line 28 of Archive/Zip/Member.pm # once (58µs+4µs) by OLE::Storage_Lite::BEGIN@830 at line 830 of OLE/Storage_Lite.pm # once (11µs+48µs) by Storable::BEGIN@83 at line 84 of Storable.pm # once (52µs+4µs) by Spreadsheet::ParseExcel::BEGIN@23 at line 23 of Spreadsheet/ParseExcel.pm # once (43µs+4µs) by Archive::Zip::Archive::BEGIN@12 at line 12 of Archive/Zip/Archive.pm # once (43µs+2µs) by Test2::Event::V2::BEGIN@12 at line 12 of Test2/Event/V2.pm # once (41µs+2µs) by Test2::Hub::BEGIN@14 at line 14 of Test2/Hub.pm # once (39µs+2µs) by Test::Builder::BEGIN@15 at line 15 of Test/Builder.pm # once (37µs+3µs) by Spreadsheet::ParseXLSX::BEGIN@12 at line 12 of /home/micha/Projekt/spreadsheet-parsexlsx/lib/Spreadsheet/ParseXLSX.pm # once (36µs+3µs) by Test::Builder::BEGIN@17 at line 17 of Test/Builder.pm # once (32µs+1µs) by Compress::Raw::Zlib::BEGIN@6 at line 6 of Compress/Raw/Zlib.pm # once (32µs+1µs) by Test2::Event::BEGIN@7 at line 7 of Test2/Event.pm # once (30µs+1µs) by Test2::EventFacet::Parent::BEGIN@7 at line 7 of Test2/EventFacet/Parent.pm # once (30µs+1µs) by Test2::API::Instance::BEGIN@11 at line 11 of Test2/API/Instance.pm # once (28µs+1000ns) by Archive::Zip::DirectoryMember::BEGIN@4 at line 4 of Archive/Zip/DirectoryMember.pm # once (25µs+2µs) by Test2::Util::BEGIN@9 at line 9 of Test2/Util.pm # once (26µs+800ns) by Test2::Hub::BEGIN@9 at line 9 of Test2/Hub.pm # once (24µs+1µs) by Spreadsheet::ParseExcel::FmtDefault::BEGIN@22 at line 22 of Spreadsheet/ParseExcel/FmtDefault.pm # once (22µs+2µs) by File::Path::BEGIN@6 at line 6 of File/Path.pm # once (22µs+1µs) by Tie::Hash::BEGIN@190 at line 190 of Tie/Hash.pm # once (23µs+900ns) by OLE::Storage_Lite::BEGIN@829 at line 829 of OLE/Storage_Lite.pm # once (22µs+1µs) by XML::Twig::Elt::BEGIN@5082 at line 5082 of XML/Twig.pm # once (22µs+1µs) by IO::File::BEGIN@122 at line 122 of IO/File.pm # once (22µs+1µs) by File::Temp::BEGIN@146 at line 146 of File/Temp.pm # once (21µs+1µs) by Test2::Hub::BEGIN@8 at line 8 of Test2/Hub.pm # once (22µs+1µs) by IO::Handle::BEGIN@273 at line 273 of IO/Handle.pm # once (21µs+1µs) by Test2::API::BEGIN@102 at line 102 of Test2/API.pm # once (21µs+1µs) by File::Temp::BEGIN@149 at line 149 of File/Temp.pm # once (21µs+1µs) by Archive::Zip::Archive::BEGIN@10 at line 10 of Archive/Zip/Archive.pm # once (21µs+1µs) by XML::Parser::ExpatNB::BEGIN@600 at line 600 of XML/Parser/Expat.pm # once (20µs+1µs) by Storable::BEGIN@42 at line 42 of Storable.pm # once (20µs+1µs) by IO::File::BEGIN@121 at line 121 of IO/File.pm # once (20µs+1000ns) by XML::Parser::BEGIN@15 at line 15 of XML/Parser.pm # once (19µs+1µs) by Test2::API::Context::BEGIN@8 at line 8 of Test2/API/Context.pm # once (19µs+1µs) by IO::Seekable::BEGIN@103 at line 103 of IO/Seekable.pm # once (19µs+1000ns) by Crypt::Cipher::BEGIN@7 at line 7 of Crypt/Cipher.pm # once (19µs+1µs) by Test2::EventFacet::Trace::BEGIN@9 at line 9 of Test2/EventFacet/Trace.pm # once (19µs+1µs) by Test2::API::Context::BEGIN@25 at line 25 of Test2/API/Context.pm # once (19µs+800ns) by SelectSaver::BEGIN@38 at line 38 of SelectSaver.pm # once (19µs+800ns) by IO::BEGIN@6 at line 6 of IO.pm # once (19µs+1µs) by Test2::API::Instance::BEGIN@8 at line 8 of Test2/API/Instance.pm # once (19µs+900ns) by IO::Seekable::BEGIN@98 at line 98 of IO/Seekable.pm # once (19µs+1000ns) by Encode::BEGIN@56 at line 56 of Encode.pm # once (18µs+1µs) by Test2::Event::BEGIN@11 at line 11 of Test2/Event.pm # once (19µs+700ns) by XML::Twig::BEGIN@29 at line 29 of XML/Twig.pm # once (18µs+1µs) by Test2::API::Stack::BEGIN@10 at line 10 of Test2/API/Stack.pm # once (18µs+1µs) by Graphics::ColorUtils::BEGIN@8 at line 8 of Graphics/ColorUtils.pm # once (18µs+1µs) by JSON::PP::BEGIN@15 at line 15 of JSON/PP.pm # once (18µs+800ns) by IO::File::BEGIN@124 at line 124 of IO/File.pm # once (17µs+1000ns) by Test2::Util::Facets2Legacy::BEGIN@7 at line 7 of Test2/Util/Facets2Legacy.pm # once (17µs+1µs) by Archive::Zip::Archive::BEGIN@6 at line 6 of Archive/Zip/Archive.pm # once (17µs+1µs) by Spreadsheet::ParseExcel::BEGIN@22 at line 22 of Spreadsheet/ParseExcel.pm # once (17µs+1µs) by Test2::EventFacet::BEGIN@8 at line 8 of Test2/EventFacet.pm # once (17µs+800ns) by CryptX::BEGIN@10 at line 10 of CryptX.pm # once (17µs+900ns) by XML::Parser::Expat::BEGIN@8 at line 8 of XML/Parser/Expat.pm # once (16µs+1µs) by OLE::Storage_Lite::BEGIN@832 at line 832 of OLE/Storage_Lite.pm # once (16µs+1µs) by File::Temp::Dir::BEGIN@2601 at line 2601 of File/Temp.pm # once (16µs+700ns) by Archive::Zip::Archive::BEGIN@11 at line 11 of Archive/Zip/Archive.pm # once (16µs+700ns) by Spreadsheet::ParseExcel::BEGIN@26 at line 26 of Spreadsheet/ParseExcel.pm # once (16µs+1µs) by Test2::API::Context::BEGIN@10 at line 10 of Test2/API/Context.pm # once (16µs+700ns) by IO::Handle::BEGIN@274 at line 274 of IO/Handle.pm # once (16µs+1µs) by Test2::Event::V2::BEGIN@7 at line 7 of Test2/Event/V2.pm # once (16µs+700ns) by XML::Twig::BEGIN@31 at line 31 of XML/Twig.pm # once (16µs+1µs) by Test2::Event::Plan::BEGIN@11 at line 11 of Test2/Event/Plan.pm # once (16µs+700ns) by SelectSaver::BEGIN@39 at line 39 of SelectSaver.pm # once (16µs+500ns) by Digest::SHA::BEGIN@8 at line 8 of Digest/SHA.pm # once (15µs+800ns) by XML::Twig::Elt::BEGIN@5096 at line 5157 of XML/Twig.pm # once (15µs+900ns) by Test2::Hub::Subtest::BEGIN@9 at line 9 of Test2/Hub/Subtest.pm # once (15µs+800ns) by Test2::Util::ExternalMeta::BEGIN@8 at line 8 of Test2/Util/ExternalMeta.pm # once (14µs+700ns) by Archive::Zip::Member::BEGIN@30 at line 30 of Archive/Zip/Member.pm # once (14µs+800ns) by Test2::API::BEGIN@104 at line 104 of Test2/API.pm # once (14µs+800ns) by Spreadsheet::ParseExcel::Worksheet::BEGIN@21 at line 21 of Spreadsheet/ParseExcel/Worksheet.pm # once (14µs+800ns) by Test2::Formatter::TAP::BEGIN@7 at line 7 of Test2/Formatter/TAP.pm # once (14µs+700ns) by Test2::API::Context::BEGIN@9 at line 9 of Test2/API/Context.pm # once (14µs+800ns) by Test2::API::BEGIN@6 at line 6 of Test2/API.pm # once (14µs+400ns) by Digest::SHA::BEGIN@9 at line 9 of Digest/SHA.pm # once (14µs+600ns) by Test2::Event::BEGIN@8 at line 8 of Test2/Event.pm # once (13µs+600ns) by Test2::API::BEGIN@103 at line 103 of Test2/API.pm # once (13µs+1000ns) by File::Temp::BEGIN@153 at line 153 of File/Temp.pm # once (13µs+700ns) by File::Temp::BEGIN@151 at line 151 of File/Temp.pm # once (13µs+500ns) by Archive::Zip::Member::BEGIN@29 at line 29 of Archive/Zip/Member.pm # once (13µs+500ns) by Test2::EventFacet::Trace::BEGIN@11 at line 11 of Test2/EventFacet/Trace.pm # once (13µs+700ns) by XML::Twig::BEGIN@148 at line 168 of XML/Twig.pm # once (13µs+0s) by Cwd::BEGIN@3 at line 3 of Cwd.pm # once (12µs+600ns) by Test2::Event::V2::BEGIN@8 at line 8 of Test2/Event/V2.pm # once (12µs+500ns) by Test2::Event::BEGIN@12 at line 12 of Test2/Event.pm # once (12µs+0s) by File::Temp::BEGIN@152 at line 152 of File/Temp.pm # once (12µs+500ns) by Test2::API::Instance::BEGIN@9 at line 9 of Test2/API/Instance.pm # once (11µs+500ns) by Spreadsheet::ParseXLSX::BEGIN@13 at line 13 of /home/micha/Projekt/spreadsheet-parsexlsx/lib/Spreadsheet/ParseXLSX.pm # once (11µs+600ns) by Test2::Util::Facets2Legacy::BEGIN@8 at line 8 of Test2/Util/Facets2Legacy.pm # once (12µs+0s) by Spreadsheet::ParseExcel::BEGIN@27 at line 27 of Spreadsheet/ParseExcel.pm # once (11µs+0s) by Spreadsheet::ParseXLSX::Decryptor::BEGIN@16 at line 16 of /home/micha/Projekt/spreadsheet-parsexlsx/lib/Spreadsheet/ParseXLSX/Decryptor.pm # once (10µs+400ns) by Test2::Hub::BEGIN@11 at line 11 of Test2/Hub.pm # once (10µs+0s) by Spreadsheet::ParseXLSX::BEGIN@11 at line 11 of /home/micha/Projekt/spreadsheet-parsexlsx/lib/Spreadsheet/ParseXLSX.pm # once (9µs+0s) by Spreadsheet::ParseExcel::BEGIN@21 at line 21 of Spreadsheet/ParseExcel.pm # once (9µs+0s) by Time::Local::BEGIN@6 at line 6 of Time/Local.pm # once (8µs+0s) by Digest::Perl::MD5::BEGIN@4 at line 4 of Digest/Perl/MD5.pm # once (8µs+0s) by JSON::BEGIN@6 at line 6 of JSON.pm # once (7µs+0s) by OLE::Storage_Lite::PPS::Root::BEGIN@170 at line 170 of OLE/Storage_Lite.pm # once (5µs+0s) by Fcntl::BEGIN@60 at line 60 of Fcntl.pm # once (4µs+0s) by URI::Escape::BEGIN@147 at line 147 of URI/Escape.pm # once (4µs+0s) by Errno::BEGIN@8 at line 8 of Errno.pm # once (4µs+0s) by Encode::BEGIN@15 at line 15 of Encode.pm # once (4µs+0s) by File::Find::BEGIN@7 at line 7 of File/Find.pm # once (4µs+0s) by File::Temp::BEGIN@176 at line 176 of File/Temp.pm # once (4µs+0s) by Encode::Alias::BEGIN@7 at line 7 of Encode/Alias.pm
sub import {
2612532µs my $pkg = shift;
2712553µs my $callpkg = caller($ExportLevel);
28
2912538µs if ($pkg eq "Exporter" and @_ and $_[0] eq "import") {
30714µs *{$callpkg."::import"} = \&import;
31714µs return;
32 }
33
34 # We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-(
35118122µs my $exports = \@{"$pkg\::EXPORT"};
36 # But, avoid creating things if they don't exist, which saves a couple of
37 # hundred bytes per package processed.
3811884µs my $fail = ${$pkg . '::'}{EXPORT_FAIL} && \@{"$pkg\::EXPORT_FAIL"};
3911861µs return export $pkg, $callpkg, @_
40 if $Verbose or $Debug or $fail && @$fail > 1;
4111846µs my $export_cache = ($Cache{$pkg} ||= {});
4211880µs my $args = @_ or @_ = @$exports;
43
4411831µs if ($args and not %$export_cache) {
45 s/^&//, $export_cache->{$_} = 1
46201.08ms135972µs foreach (@$exports, @{"$pkg\::EXPORT_OK"});
# spent 72µs making 1359 calls to CORE::subst, avg 53ns/call
47 }
4811810µs my $heavy;
49 # Try very hard not to use {} and hence have to enter scope on the foreach
50 # We bomb out of the loop with last as soon as heavy is set.
5111844µs if ($args or $fail) {
52 ($heavy = (/\W/ or $args and not exists $export_cache->{$_}
53 or $fail and @$fail and $_ eq $fail->[0])) and last
5491565µs368100µs foreach (@_);
# spent 100µs making 368 calls to CORE::match, avg 271ns/call
55 } else {
56 ($heavy = /\W/) and last
5727196µs21331µs foreach (@_);
# spent 31µs making 213 calls to CORE::match, avg 146ns/call
58 }
5911844µs972µs return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
# spent 72µs making 9 calls to Exporter::export, avg 8µs/call
60 local $SIG{__WARN__} =
61109264µs sub {require Carp; &Carp::carp} if not $SIG{__WARN__};
62 # shortcut for the common case of no type character
631091.04ms *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;
64}
65
66# Default methods
67
68sub export_fail {
69 my $self = shift;
70 @_;
71}
72
73# Unfortunately, caller(1)[3] "does not work" if the caller is aliased as
74# *name = \&foo. Thus the need to create a lot of identical subroutines
75# Otherwise we could have aliased them to export().
76
77
# spent 1.20ms (7µs+1.19) within Exporter::export_to_level which was called 3 times, avg 399µs/call: # 3 times (7µs+1.19ms) by Time::HiRes::import at line 91 of Time/HiRes.pm, avg 399µs/call
sub export_to_level {
7839µs61.35ms goto &{as_heavy()};
# spent 1.19ms making 3 calls to Exporter::as_heavy, avg 396µs/call # spent 161µs making 3 calls to Exporter::Heavy::heavy_export_to_level, avg 54µs/call
79}
80
81
# spent 15µs (4+11) within Exporter::export_tags which was called: # once (4µs+11µs) by Archive::Zip::BEGIN@11 at line 205 of File/Temp.pm
sub export_tags {
8214µs224µs goto &{as_heavy()};
# spent 14µs making 1 call to Exporter::Heavy::heavy_export_tags # spent 11µs making 1 call to Exporter::as_heavy
83}
84
85
# spent 12µs (3+8) within Exporter::export_ok_tags which was called: # once (3µs+8µs) by Archive::Zip::BEGIN@37 at line 173 of Archive/Zip.pm
sub export_ok_tags {
8614µs232µs goto &{as_heavy()};
# spent 24µs making 1 call to Exporter::Heavy::heavy_export_ok_tags # spent 8µs making 1 call to Exporter::as_heavy
87}
88
89sub require_version {
90 goto &{as_heavy()};
91}
92
9313µs1;
94__END__