← 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/Archive/Zip/FileMember.pm
StatementsExecuted 383 statements in 495µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
75111118µs554µsArchive::Zip::FileMember::::fhArchive::Zip::FileMember::fh
314285µs158µsArchive::Zip::FileMember::::endReadArchive::Zip::FileMember::endRead
71137µs409µsArchive::Zip::FileMember::::_openFileArchive::Zip::FileMember::_openFile
11110µs12µsArchive::Zip::FileMember::::BEGIN@3Archive::Zip::FileMember::BEGIN@3
14228µs8µsArchive::Zip::FileMember::::externalFileNameArchive::Zip::FileMember::externalFileName
1116µs6µsArchive::Zip::FileMember::::BEGIN@6Archive::Zip::FileMember::BEGIN@6
1114µs22µsArchive::Zip::FileMember::::BEGIN@4Archive::Zip::FileMember::BEGIN@4
1114µs69µsArchive::Zip::FileMember::::BEGIN@11Archive::Zip::FileMember::BEGIN@11
0000s0sArchive::Zip::FileMember::::_becomeArchive::Zip::FileMember::_become
0000s0sArchive::Zip::FileMember::::_usesFileNamedArchive::Zip::FileMember::_usesFileNamed
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Archive::Zip::FileMember;
2
3224µs214µs
# spent 12µs (10+2) within Archive::Zip::FileMember::BEGIN@3 which was called: # once (10µs+2µs) by Spreadsheet::ParseXLSX::BEGIN@11 at line 3
use strict;
# spent 12µs making 1 call to Archive::Zip::FileMember::BEGIN@3 # spent 2µs making 1 call to strict::import
4235µs240µs
# spent 22µs (4+18) within Archive::Zip::FileMember::BEGIN@4 which was called: # once (4µs+18µs) by Spreadsheet::ParseXLSX::BEGIN@11 at line 4
use vars qw( $VERSION @ISA );
# spent 22µs making 1 call to Archive::Zip::FileMember::BEGIN@4 # spent 18µs making 1 call to vars::import
5
6
# spent 6µs within Archive::Zip::FileMember::BEGIN@6 which was called: # once (6µs+0s) by Spreadsheet::ParseXLSX::BEGIN@11 at line 9
BEGIN {
71200ns $VERSION = '1.68';
816µs @ISA = qw ( Archive::Zip::Member );
9114µs16µs}
# spent 6µs making 1 call to Archive::Zip::FileMember::BEGIN@6
10
1112µs166µs
# spent 69µs (4+66) within Archive::Zip::FileMember::BEGIN@11 which was called: # once (4µs+66µs) by Spreadsheet::ParseXLSX::BEGIN@11 at line 13
use Archive::Zip qw(
# spent 66µs making 1 call to Exporter::import
12 :UTILITY_METHODS
131158µs169µs);
# spent 69µs making 1 call to Archive::Zip::FileMember::BEGIN@11
14
15
# spent 8µs within Archive::Zip::FileMember::externalFileName which was called 14 times, avg 557ns/call: # 7 times (5µs+0s) by Archive::Zip::FileMember::_openFile at line 38, avg 686ns/call # 7 times (3µs+0s) by Archive::Zip::ZipFileMember::_seekToLocalHeader at line 70 of Archive/Zip/ZipFileMember.pm, avg 429ns/call
sub externalFileName {
161415µs shift->{'externalFileName'};
17}
18
19# Return true if I depend on the named file
20sub _usesFileNamed {
21 my $self = shift;
22 my $fileName = shift;
23 my $xfn = $self->externalFileName();
24 return undef if ref($xfn);
25 return $xfn eq $fileName;
26}
27
28
# spent 554µs (118+437) within Archive::Zip::FileMember::fh which was called 75 times, avg 7µs/call: # 10 times (18µs+5µs) by Archive::Zip::ZipFileMember::_readCentralDirectoryFileHeader at line 369 of Archive/Zip/ZipFileMember.pm, avg 2µs/call # 7 times (16µs+409µs) by Archive::Zip::ZipFileMember::rewindData at line 443 of Archive/Zip/ZipFileMember.pm, avg 61µs/call # 7 times (19µs+2µs) by Archive::Zip::ZipFileMember::rewindData at line 458 of Archive/Zip/ZipFileMember.pm, avg 3µs/call # 7 times (12µs+6µs) by Archive::Zip::ZipFileMember::rewindData at line 445 of Archive/Zip/ZipFileMember.pm, avg 2µs/call # 7 times (10µs+3µs) by Archive::Zip::ZipFileMember::_skipLocalFileHeader at line 138 of Archive/Zip/ZipFileMember.pm, avg 2µs/call # 7 times (8µs+3µs) by Archive::Zip::ZipFileMember::_readRawChunk at line 470 of Archive/Zip/ZipFileMember.pm, avg 2µs/call # 7 times (8µs+2µs) by Archive::Zip::ZipFileMember::_skipLocalFileHeader at line 157 of Archive/Zip/ZipFileMember.pm, avg 2µs/call # 7 times (8µs+2µs) by Archive::Zip::ZipFileMember::_seekToLocalHeader at line 67 of Archive/Zip/ZipFileMember.pm, avg 2µs/call # 7 times (8µs+2µs) by Archive::Zip::ZipFileMember::_seekToLocalHeader at line 70 of Archive/Zip/ZipFileMember.pm, avg 1µs/call # 7 times (8µs+2µs) by Archive::Zip::ZipFileMember::_skipLocalFileHeader at line 178 of Archive/Zip/ZipFileMember.pm, avg 1µs/call # 2 times (2µs+500ns) by Archive::Zip::ZipFileMember::_skipLocalFileHeader at line 165 of Archive/Zip/ZipFileMember.pm, avg 1µs/call
sub fh {
29756µs my $self = shift;
30 $self->_openFile()
317554µs75437µs if !defined($self->{'fh'}) || !$self->{'fh'}->opened();
# spent 409µs making 7 calls to Archive::Zip::FileMember::_openFile, avg 58µs/call # spent 28µs making 68 calls to IO::Handle::opened, avg 412ns/call
327565µs return $self->{'fh'};
33}
34
35# opens my file handle from my file name
36
# spent 409µs (37+372) within Archive::Zip::FileMember::_openFile which was called 7 times, avg 58µs/call: # 7 times (37µs+372µs) by Archive::Zip::FileMember::fh at line 31, avg 58µs/call
sub _openFile {
377900ns my $self = shift;
38712µs14310µs my ($status, $fh) = _newFileHandle($self->externalFileName(), 'r');
# spent 306µs making 7 calls to Archive::Zip::_newFileHandle, avg 44µs/call # spent 5µs making 7 calls to Archive::Zip::FileMember::externalFileName, avg 686ns/call
3971µs if (!$status) {
40 _ioError("Can't open", $self->externalFileName());
41 return undef;
42 }
4372µs $self->{'fh'} = $fh;
4476µs762µs _binmode($fh);
# spent 62µs making 7 calls to Archive::Zip::_binmode, avg 9µs/call
4578µs return $fh;
46}
47
48# Make sure I close my file handle
49
# spent 158µs (85+72) within Archive::Zip::FileMember::endRead which was called 31 times, avg 5µs/call: # 10 times (17µs+12µs) by Archive::Zip::Archive::readFromFileHandle at line 794 of Archive/Zip/Archive.pm, avg 3µs/call # 7 times (51µs+51µs) by Archive::Zip::Member::_inflateChunk at line 1185 of Archive/Zip/Member.pm, avg 15µs/call # 7 times (9µs+5µs) by Archive::Zip::Member::readChunk at line 1132 of Archive/Zip/Member.pm, avg 2µs/call # 7 times (9µs+5µs) by Archive::Zip::Member::contents at line 1308 of Archive/Zip/Member.pm, avg 2µs/call
sub endRead {
50313µs my $self = shift;
513142µs undef $self->{'fh'}; # _closeFile();
523140µs3172µs return $self->SUPER::endRead(@_);
# spent 72µs making 31 calls to Archive::Zip::Member::endRead, avg 2µs/call
53}
54
55sub _become {
56 my $self = shift;
57 my $newClass = shift;
58 return $self if ref($self) eq $newClass;
59 delete($self->{'externalFileName'});
60 delete($self->{'fh'});
61 return $self->SUPER::_become($newClass);
62}
63
6412µs1;