Filename | /usr/lib/perl5/site_perl/5.14/Archive/Zip/DirectoryMember.pm |
Statements | Executed 30393 statements in 356ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1381 | 1 | 1 | 263ms | 263ms | CORE:utime (opcode) | Archive::Zip::DirectoryMember::
5524 | 3 | 1 | 61.7ms | 85.9ms | fileName | Archive::Zip::DirectoryMember::
1381 | 1 | 1 | 39.5ms | 1.94s | extractToFileNamed | Archive::Zip::DirectoryMember::
1 | 1 | 1 | 658µs | 668µs | BEGIN@3 | Archive::Zip::DirectoryMember::
1 | 1 | 1 | 20µs | 20µs | BEGIN@8 | Archive::Zip::DirectoryMember::
1 | 1 | 1 | 15µs | 90µs | BEGIN@4 | Archive::Zip::DirectoryMember::
1 | 1 | 1 | 15µs | 379µs | BEGIN@13 | Archive::Zip::DirectoryMember::
1 | 1 | 1 | 15µs | 86µs | BEGIN@6 | Archive::Zip::DirectoryMember::
0 | 0 | 0 | 0s | 0s | _newNamed | Archive::Zip::DirectoryMember::
0 | 0 | 0 | 0s | 0s | contents | Archive::Zip::DirectoryMember::
0 | 0 | 0 | 0s | 0s | externalFileName | Archive::Zip::DirectoryMember::
0 | 0 | 0 | 0s | 0s | isDirectory | Archive::Zip::DirectoryMember::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Archive::Zip::DirectoryMember; | ||||
2 | |||||
3 | 2 | 78µs | 2 | 678µs | # spent 668µs (658+10) within Archive::Zip::DirectoryMember::BEGIN@3 which was called:
# once (658µs+10µs) by installer::archivefiles::BEGIN@30 at line 3 # spent 668µs making 1 call to Archive::Zip::DirectoryMember::BEGIN@3
# spent 10µs making 1 call to strict::import |
4 | 2 | 67µs | 2 | 166µs | # spent 90µs (15+75) within Archive::Zip::DirectoryMember::BEGIN@4 which was called:
# once (15µs+75µs) by installer::archivefiles::BEGIN@30 at line 4 # spent 90µs making 1 call to Archive::Zip::DirectoryMember::BEGIN@4
# spent 75µs making 1 call to Exporter::import |
5 | |||||
6 | 2 | 90µs | 2 | 156µs | # spent 86µs (15+71) within Archive::Zip::DirectoryMember::BEGIN@6 which was called:
# once (15µs+71µs) by installer::archivefiles::BEGIN@30 at line 6 # spent 86µs making 1 call to Archive::Zip::DirectoryMember::BEGIN@6
# spent 71µs making 1 call to vars::import |
7 | |||||
8 | # spent 20µs within Archive::Zip::DirectoryMember::BEGIN@8 which was called:
# once (20µs+0s) by installer::archivefiles::BEGIN@30 at line 11 | ||||
9 | 1 | 1µs | $VERSION = '1.30'; | ||
10 | 1 | 19µs | @ISA = qw( Archive::Zip::Member ); | ||
11 | 1 | 62µs | 1 | 20µs | } # spent 20µs making 1 call to Archive::Zip::DirectoryMember::BEGIN@8 |
12 | |||||
13 | 1 | 8µs | 1 | 364µs | # spent 379µs (15+364) within Archive::Zip::DirectoryMember::BEGIN@13 which was called:
# once (15µs+364µs) by installer::archivefiles::BEGIN@30 at line 16 # spent 364µs making 1 call to Exporter::import |
14 | :ERROR_CODES | ||||
15 | :UTILITY_METHODS | ||||
16 | 1 | 764µs | 1 | 379µs | ); # spent 379µs making 1 call to Archive::Zip::DirectoryMember::BEGIN@13 |
17 | |||||
18 | sub _newNamed { | ||||
19 | my $class = shift; | ||||
20 | my $fileName = shift; # FS name | ||||
21 | my $newName = shift; # Zip name | ||||
22 | $newName = _asZipDirName($fileName) unless $newName; | ||||
23 | my $self = $class->new(@_); | ||||
24 | $self->{'externalFileName'} = $fileName; | ||||
25 | $self->fileName($newName); | ||||
26 | |||||
27 | if ( -e $fileName ) { | ||||
28 | |||||
29 | # -e does NOT do a full stat, so we need to do one now | ||||
30 | if ( -d _ ) { | ||||
31 | my @stat = stat(_); | ||||
32 | $self->unixFileAttributes( $stat[2] ); | ||||
33 | my $mod_t = $stat[9]; | ||||
34 | if ( $^O eq 'MSWin32' and !$mod_t ) { | ||||
35 | $mod_t = time(); | ||||
36 | } | ||||
37 | $self->setLastModFileDateTimeFromUnix($mod_t); | ||||
38 | |||||
39 | } else { # hmm.. trying to add a non-directory? | ||||
40 | _error( $fileName, ' exists but is not a directory' ); | ||||
41 | return undef; | ||||
42 | } | ||||
43 | } else { | ||||
44 | $self->unixFileAttributes( $self->DEFAULT_DIRECTORY_PERMISSIONS ); | ||||
45 | $self->setLastModFileDateTimeFromUnix( time() ); | ||||
46 | } | ||||
47 | return $self; | ||||
48 | } | ||||
49 | |||||
50 | sub externalFileName { | ||||
51 | shift->{'externalFileName'}; | ||||
52 | } | ||||
53 | |||||
54 | sub isDirectory { | ||||
55 | return 1; | ||||
56 | } | ||||
57 | |||||
58 | # spent 1.94s (39.5ms+1.90) within Archive::Zip::DirectoryMember::extractToFileNamed which was called 1381 times, avg 1.40ms/call:
# 1381 times (39.5ms+1.90s) by Archive::Zip::Archive::extractTree at line 822 of Archive/Zip/Archive.pm, avg 1.40ms/call | ||||
59 | 1381 | 898µs | my $self = shift; | ||
60 | 1381 | 972µs | my $name = shift; # local FS name | ||
61 | 1381 | 3.97ms | 1381 | 20.2ms | my $attribs = $self->unixFileAttributes() & 07777; # spent 20.2ms making 1381 calls to Archive::Zip::Member::unixFileAttributes, avg 15µs/call |
62 | 1381 | 4.28ms | 1381 | 1.21s | mkpath( $name, 0, $attribs ); # croaks on error # spent 1.21s making 1381 calls to File::Path::mkpath, avg 879µs/call |
63 | 1381 | 280ms | 4143 | 664ms | utime( $self->lastModTime(), $self->lastModTime(), $name ); # spent 401ms making 2762 calls to Archive::Zip::Member::lastModTime, avg 145µs/call
# spent 263ms making 1381 calls to Archive::Zip::DirectoryMember::CORE:utime, avg 190µs/call |
64 | 1381 | 7.14ms | return AZ_OK; | ||
65 | } | ||||
66 | |||||
67 | # spent 85.9ms (61.7+24.1) within Archive::Zip::DirectoryMember::fileName which was called 5524 times, avg 16µs/call:
# 2762 times (27.9ms+11.7ms) by Archive::Zip::Archive::memberNames at line 72 of Archive/Zip/Archive.pm, avg 14µs/call
# 1381 times (20.1ms+6.90ms) by Archive::Zip::Archive::extractTree at line 818 of Archive/Zip/Archive.pm, avg 20µs/call
# 1381 times (13.8ms+5.56ms) by Archive::Zip::Archive::membersMatching at line 88 of Archive/Zip/Archive.pm, avg 14µs/call | ||||
68 | 5524 | 3.07ms | my $self = shift; | ||
69 | 5524 | 2.42ms | my $newName = shift; | ||
70 | 5524 | 2.28ms | $newName =~ s{/?$}{/} if defined($newName); | ||
71 | 5524 | 50.2ms | 5524 | 24.1ms | return $self->SUPER::fileName($newName); # spent 24.1ms making 5524 calls to Archive::Zip::Member::fileName, avg 4µs/call |
72 | } | ||||
73 | |||||
74 | # So people don't get too confused. This way it looks like the problem | ||||
75 | # is in their code... | ||||
76 | sub contents { | ||||
77 | return wantarray ? ( undef, AZ_OK ) : undef; | ||||
78 | } | ||||
79 | |||||
80 | 1 | 8µs | 1; | ||
# spent 263ms within Archive::Zip::DirectoryMember::CORE:utime which was called 1381 times, avg 190µs/call:
# 1381 times (263ms+0s) by Archive::Zip::DirectoryMember::extractToFileNamed at line 63, avg 190µs/call |