← Index
NYTProf Performance Profile   « line view »
For /Users/brian/bin/perls/cpan5.26.1
  Run on Sat Dec 30 01:41:10 2017
Reported on Sat Dec 30 01:44:15 2017

Filename/usr/local/perls/perl-5.26.1/lib/5.26.1/IO/Uncompress/Adapter/Inflate.pm
StatementsExecuted 5721 statements in 37.1ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
6311112.3ms43.4msIO::Uncompress::Adapter::Inflate::::uncomprIO::Uncompress::Adapter::Inflate::uncompr
311334µs2.78msIO::Uncompress::Adapter::Inflate::::mkUncompObjectIO::Uncompress::Adapter::Inflate::mkUncompObject
11128µs33µsIO::Uncompress::Adapter::Inflate::::BEGIN@3IO::Uncompress::Adapter::Inflate::BEGIN@3
11117µs188µsIO::Uncompress::Adapter::Inflate::::BEGIN@7IO::Uncompress::Adapter::Inflate::BEGIN@7
11116µs87µsIO::Uncompress::Adapter::Inflate::::BEGIN@8IO::Uncompress::Adapter::Inflate::BEGIN@8
11112µs25µsIO::Uncompress::Adapter::Inflate::::BEGIN@4IO::Uncompress::Adapter::Inflate::BEGIN@4
11112µs14µsIO::Uncompress::Adapter::Inflate::::BEGIN@5IO::Uncompress::Adapter::Inflate::BEGIN@5
0000s0sIO::Uncompress::Adapter::Inflate::::adler32IO::Uncompress::Adapter::Inflate::adler32
0000s0sIO::Uncompress::Adapter::Inflate::::compressedBytesIO::Uncompress::Adapter::Inflate::compressedBytes
0000s0sIO::Uncompress::Adapter::Inflate::::crc32IO::Uncompress::Adapter::Inflate::crc32
0000s0sIO::Uncompress::Adapter::Inflate::::createDeflateStreamIO::Uncompress::Adapter::Inflate::createDeflateStream
0000s0sIO::Uncompress::Adapter::Inflate::::getEndOffsetIO::Uncompress::Adapter::Inflate::getEndOffset
0000s0sIO::Uncompress::Adapter::Inflate::::getLastBlockOffsetIO::Uncompress::Adapter::Inflate::getLastBlockOffset
0000s0sIO::Uncompress::Adapter::Inflate::::resetIO::Uncompress::Adapter::Inflate::reset
0000s0sIO::Uncompress::Adapter::Inflate::::resetLastBlockByteIO::Uncompress::Adapter::Inflate::resetLastBlockByte
0000s0sIO::Uncompress::Adapter::Inflate::::syncIO::Uncompress::Adapter::Inflate::sync
0000s0sIO::Uncompress::Adapter::Inflate::::uncompressedBytesIO::Uncompress::Adapter::Inflate::uncompressedBytes
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package IO::Uncompress::Adapter::Inflate;
2
3238µs238µs
# spent 33µs (28+5) within IO::Uncompress::Adapter::Inflate::BEGIN@3 which was called: # once (28µs+5µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 3
use strict;
# spent 33µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@3 # spent 5µs making 1 call to strict::import
4239µs238µs
# spent 25µs (12+13) within IO::Uncompress::Adapter::Inflate::BEGIN@4 which was called: # once (12µs+13µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 4
use warnings;
# spent 25µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@4 # spent 13µs making 1 call to warnings::import
5240µs216µs
# spent 14µs (12+2) within IO::Uncompress::Adapter::Inflate::BEGIN@5 which was called: # once (12µs+2µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 5
use bytes;
# spent 14µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@5 # spent 2µs making 1 call to bytes::import
6
7365µs3359µs
# spent 188µs (17+171) within IO::Uncompress::Adapter::Inflate::BEGIN@7 which was called: # once (17µs+171µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 7
use IO::Compress::Base::Common 2.074 qw(:Status);
# spent 188µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@7 # spent 158µs making 1 call to Exporter::import # spent 13µs making 1 call to version::_VERSION
83728µs3158µs
# spent 87µs (16+71) within IO::Uncompress::Adapter::Inflate::BEGIN@8 which was called: # once (16µs+71µs) by IO::Uncompress::RawInflate::BEGIN@12 at line 8
use Compress::Raw::Zlib 2.074 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS);
# spent 87µs making 1 call to IO::Uncompress::Adapter::Inflate::BEGIN@8 # spent 60µs making 1 call to Exporter::import # spent 11µs making 1 call to version::_VERSION
9
10our ($VERSION);
1111µs$VERSION = '2.074';
12
- -
15sub mkUncompObject
16
# spent 2.78ms (334µs+2.45) within IO::Uncompress::Adapter::Inflate::mkUncompObject which was called 3 times, avg 928µs/call: # 3 times (334µs+2.45ms) by IO::Uncompress::RawInflate::mkUncomp at line 76 of IO/Uncompress/RawInflate.pm, avg 928µs/call
{
1730s my $crc32 = shift || 1;
18313µs my $adler32 = shift || 1;
1930s my $scan = shift || 0;
20
21323µs my $inflate ;
22 my $status ;
23
2432µs if ($scan)
25 {
26 ($inflate, $status) = new Compress::Raw::Zlib::InflateScan
27 #LimitOutput => 1,
28 CRC32 => $crc32,
29 ADLER32 => $adler32,
30 WindowBits => - MAX_WBITS ;
31 }
32 else
33 {
343109µs62.40ms ($inflate, $status) = new Compress::Raw::Zlib::Inflate
# spent 2.38ms making 3 calls to Compress::Raw::Zlib::Inflate::new, avg 793µs/call # spent 21µs making 3 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 7µs/call
35 AppendOutput => 1,
36 LimitOutput => 1,
37 CRC32 => $crc32,
38 ADLER32 => $adler32,
39 WindowBits => - MAX_WBITS ;
40 }
41
42334µs346µs return (undef, "Could not create Inflation object: $status", $status)
# spent 32µs making 1 call to Compress::Raw::Zlib::AUTOLOAD # spent 14µs making 2 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 7µs/call
43 if $status != Z_OK ;
44
45341µs return bless {'Inf' => $inflate,
46 'CompSize' => 0,
47 'UnCompSize' => 0,
48 'Error' => '',
49 'ConsumesInput' => 1,
50 } ;
51
52}
53
54sub uncompr
55
# spent 43.4ms (12.3+31.1) within IO::Uncompress::Adapter::Inflate::uncompr which was called 631 times, avg 69µs/call: # 631 times (12.3ms+31.1ms) by IO::Uncompress::Base::_raw_read at line 913 of IO/Uncompress/Base.pm, avg 69µs/call
{
56631143µs my $self = shift ;
5763184µs my $from = shift ;
5863179µs my $to = shift ;
59631172µs my $eof = shift ;
60
61631242µs my $inf = $self->{Inf};
62
6363129.7ms63127.8ms my $status = $inf->inflate($from, $to, $eof);
# spent 27.8ms making 631 calls to Compress::Raw::Zlib::inflateStream::inflate, avg 44µs/call
64631261µs $self->{ErrorNo} = $status;
65
666313.14ms18912.66ms if ($status != Z_OK && $status != Z_STREAM_END && $status != Z_BUF_ERROR)
# spent 2.60ms making 1889 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 1µs/call # spent 60µs making 2 calls to Compress::Raw::Zlib::AUTOLOAD, avg 30µs/call
67 {
68 $self->{Error} = "Inflation Error: $status";
69 return STATUS_ERROR;
70 }
71
726312.12ms631616µs return STATUS_OK if $status == Z_BUF_ERROR ; # ???
# spent 616µs making 631 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 976ns/call
73211µs23µs return STATUS_OK if $status == Z_OK ;
# spent 3µs making 2 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 2µs/call
7427µs23µs return STATUS_ENDSTREAM if $status == Z_STREAM_END ;
# spent 3µs making 2 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:114], avg 2µs/call
75 return STATUS_ERROR ;
76}
77
78sub reset
79{
80 my $self = shift ;
81 $self->{Inf}->inflateReset();
82
83 return STATUS_OK ;
84}
85
86#sub count
87#{
88# my $self = shift ;
89# $self->{Inf}->inflateCount();
90#}
91
92sub crc32
93{
94 my $self = shift ;
95 $self->{Inf}->crc32();
96}
97
98sub compressedBytes
99{
100 my $self = shift ;
101 $self->{Inf}->compressedBytes();
102}
103
104sub uncompressedBytes
105{
106 my $self = shift ;
107 $self->{Inf}->uncompressedBytes();
108}
109
110sub adler32
111{
112 my $self = shift ;
113 $self->{Inf}->adler32();
114}
115
116sub sync
117{
118 my $self = shift ;
119 ( $self->{Inf}->inflateSync(@_) == Z_OK)
120 ? STATUS_OK
121 : STATUS_ERROR ;
122}
123
124
125sub getLastBlockOffset
126{
127 my $self = shift ;
128 $self->{Inf}->getLastBlockOffset();
129}
130
131sub getEndOffset
132{
133 my $self = shift ;
134 $self->{Inf}->getEndOffset();
135}
136
137sub resetLastBlockByte
138{
139 my $self = shift ;
140 $self->{Inf}->resetLastBlockByte(@_);
141}
142
143sub createDeflateStream
144{
145 my $self = shift ;
146 my $deflate = $self->{Inf}->createDeflateStream(@_);
147 return bless {'Def' => $deflate,
148 'CompSize' => 0,
149 'UnCompSize' => 0,
150 'Error' => '',
151 }, 'IO::Compress::Adapter::Deflate';
152}
153
15415µs1;
155
156
157__END__