| Filename | /usr/local/perls/perl-5.26.1/lib/5.26.1/IO/Compress/Bzip2.pm |
| Statements | Executed 27 statements in 1.53ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 1.24ms | 1.64ms | IO::Compress::Bzip2::BEGIN@11 |
| 1 | 1 | 1 | 44µs | 106µs | IO::Compress::Bzip2::BEGIN@8 |
| 1 | 1 | 1 | 34µs | 41µs | IO::Compress::Bzip2::BEGIN@3 |
| 1 | 1 | 1 | 34µs | 37µs | IO::Compress::Bzip2::BEGIN@5 |
| 1 | 1 | 1 | 18µs | 181µs | IO::Compress::Bzip2::BEGIN@54 |
| 1 | 1 | 1 | 13µs | 22µs | IO::Compress::Bzip2::BEGIN@10 |
| 1 | 1 | 1 | 12µs | 24µs | IO::Compress::Bzip2::BEGIN@4 |
| 0 | 0 | 0 | 0s | 0s | IO::Compress::Bzip2::bzip2 |
| 0 | 0 | 0 | 0s | 0s | IO::Compress::Bzip2::ckParams |
| 0 | 0 | 0 | 0s | 0s | IO::Compress::Bzip2::getExtraParams |
| 0 | 0 | 0 | 0s | 0s | IO::Compress::Bzip2::getFileInfo |
| 0 | 0 | 0 | 0s | 0s | IO::Compress::Bzip2::getInverseClass |
| 0 | 0 | 0 | 0s | 0s | IO::Compress::Bzip2::mkComp |
| 0 | 0 | 0 | 0s | 0s | IO::Compress::Bzip2::mkFinalTrailer |
| 0 | 0 | 0 | 0s | 0s | IO::Compress::Bzip2::mkHeader |
| 0 | 0 | 0 | 0s | 0s | IO::Compress::Bzip2::mkTrailer |
| 0 | 0 | 0 | 0s | 0s | IO::Compress::Bzip2::new |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package IO::Compress::Bzip2 ; | ||||
| 2 | |||||
| 3 | 2 | 39µs | 2 | 48µs | # spent 41µs (34+7) within IO::Compress::Bzip2::BEGIN@3 which was called:
# once (34µs+7µs) by Archive::Tar::Constant::BEGIN@74 at line 3 # spent 41µs making 1 call to IO::Compress::Bzip2::BEGIN@3
# spent 7µs making 1 call to strict::import |
| 4 | 2 | 45µs | 2 | 36µs | # spent 24µs (12+12) within IO::Compress::Bzip2::BEGIN@4 which was called:
# once (12µs+12µs) by Archive::Tar::Constant::BEGIN@74 at line 4 # spent 24µs making 1 call to IO::Compress::Bzip2::BEGIN@4
# spent 12µs making 1 call to warnings::import |
| 5 | 2 | 47µs | 2 | 40µs | # spent 37µs (34+3) within IO::Compress::Bzip2::BEGIN@5 which was called:
# once (34µs+3µs) by Archive::Tar::Constant::BEGIN@74 at line 5 # spent 37µs making 1 call to IO::Compress::Bzip2::BEGIN@5
# spent 3µs making 1 call to bytes::import |
| 6 | 1 | 1µs | require Exporter ; | ||
| 7 | |||||
| 8 | 3 | 90µs | 3 | 168µs | # spent 106µs (44+62) within IO::Compress::Bzip2::BEGIN@8 which was called:
# once (44µs+62µs) by Archive::Tar::Constant::BEGIN@74 at line 8 # spent 106µs making 1 call to IO::Compress::Bzip2::BEGIN@8
# spent 43µs making 1 call to Exporter::import
# spent 19µs making 1 call to version::_VERSION |
| 9 | |||||
| 10 | 3 | 53µs | 2 | 31µs | # spent 22µs (13+9) within IO::Compress::Bzip2::BEGIN@10 which was called:
# once (13µs+9µs) by Archive::Tar::Constant::BEGIN@74 at line 10 # spent 22µs making 1 call to IO::Compress::Bzip2::BEGIN@10
# spent 9µs making 1 call to version::_VERSION |
| 11 | 3 | 776µs | 2 | 1.65ms | # spent 1.64ms (1.24+394µs) within IO::Compress::Bzip2::BEGIN@11 which was called:
# once (1.24ms+394µs) by Archive::Tar::Constant::BEGIN@74 at line 11 # spent 1.64ms making 1 call to IO::Compress::Bzip2::BEGIN@11
# spent 10µs making 1 call to version::_VERSION |
| 12 | |||||
| - - | |||||
| 15 | our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bzip2Error); | ||||
| 16 | |||||
| 17 | 1 | 1µs | $VERSION = '2.074'; | ||
| 18 | 1 | 0s | $Bzip2Error = ''; | ||
| 19 | |||||
| 20 | 1 | 23µs | @ISA = qw(IO::Compress::Base Exporter); | ||
| 21 | 1 | 1µs | @EXPORT_OK = qw( $Bzip2Error bzip2 ) ; | ||
| 22 | 1 | 1µs | %EXPORT_TAGS = %IO::Compress::Base::EXPORT_TAGS ; | ||
| 23 | 1 | 2µs | push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ; | ||
| 24 | 1 | 6µs | 1 | 40µs | Exporter::export_ok_tags('all'); # spent 40µs making 1 call to Exporter::export_ok_tags |
| 25 | |||||
| - - | |||||
| 28 | sub new | ||||
| 29 | { | ||||
| 30 | my $class = shift ; | ||||
| 31 | |||||
| 32 | my $obj = IO::Compress::Base::Common::createSelfTiedObject($class, \$Bzip2Error); | ||||
| 33 | return $obj->_create(undef, @_); | ||||
| 34 | } | ||||
| 35 | |||||
| 36 | sub bzip2 | ||||
| 37 | { | ||||
| 38 | my $obj = IO::Compress::Base::Common::createSelfTiedObject(undef, \$Bzip2Error); | ||||
| 39 | $obj->_def(@_); | ||||
| 40 | } | ||||
| 41 | |||||
| 42 | |||||
| 43 | sub mkHeader | ||||
| 44 | { | ||||
| 45 | my $self = shift ; | ||||
| 46 | return ''; | ||||
| 47 | |||||
| 48 | } | ||||
| 49 | |||||
| 50 | sub getExtraParams | ||||
| 51 | { | ||||
| 52 | my $self = shift ; | ||||
| 53 | |||||
| 54 | 3 | 435µs | 3 | 344µs | # spent 181µs (18+163) within IO::Compress::Bzip2::BEGIN@54 which was called:
# once (18µs+163µs) by Archive::Tar::Constant::BEGIN@74 at line 54 # spent 181µs making 1 call to IO::Compress::Bzip2::BEGIN@54
# spent 154µs making 1 call to Exporter::import
# spent 9µs making 1 call to version::_VERSION |
| 55 | |||||
| 56 | return ( | ||||
| 57 | 'blocksize100k' => [IO::Compress::Base::Common::Parse_unsigned, 1], | ||||
| 58 | 'workfactor' => [IO::Compress::Base::Common::Parse_unsigned, 0], | ||||
| 59 | 'verbosity' => [IO::Compress::Base::Common::Parse_boolean, 0], | ||||
| 60 | ); | ||||
| 61 | } | ||||
| 62 | |||||
| - - | |||||
| 65 | sub ckParams | ||||
| 66 | { | ||||
| 67 | my $self = shift ; | ||||
| 68 | my $got = shift; | ||||
| 69 | |||||
| 70 | # check that BlockSize100K is a number between 1 & 9 | ||||
| 71 | if ($got->parsed('blocksize100k')) { | ||||
| 72 | my $value = $got->getValue('blocksize100k'); | ||||
| 73 | return $self->saveErrorString(undef, "Parameter 'BlockSize100K' not between 1 and 9, got $value") | ||||
| 74 | unless defined $value && $value >= 1 && $value <= 9; | ||||
| 75 | |||||
| 76 | } | ||||
| 77 | |||||
| 78 | # check that WorkFactor between 0 & 250 | ||||
| 79 | if ($got->parsed('workfactor')) { | ||||
| 80 | my $value = $got->getValue('workfactor'); | ||||
| 81 | return $self->saveErrorString(undef, "Parameter 'WorkFactor' not between 0 and 250, got $value") | ||||
| 82 | unless $value >= 0 && $value <= 250; | ||||
| 83 | } | ||||
| 84 | |||||
| 85 | return 1 ; | ||||
| 86 | } | ||||
| 87 | |||||
| 88 | |||||
| 89 | sub mkComp | ||||
| 90 | { | ||||
| 91 | my $self = shift ; | ||||
| 92 | my $got = shift ; | ||||
| 93 | |||||
| 94 | my $BlockSize100K = $got->getValue('blocksize100k'); | ||||
| 95 | my $WorkFactor = $got->getValue('workfactor'); | ||||
| 96 | my $Verbosity = $got->getValue('verbosity'); | ||||
| 97 | |||||
| 98 | my ($obj, $errstr, $errno) = IO::Compress::Adapter::Bzip2::mkCompObject( | ||||
| 99 | $BlockSize100K, $WorkFactor, | ||||
| 100 | $Verbosity); | ||||
| 101 | |||||
| 102 | return $self->saveErrorString(undef, $errstr, $errno) | ||||
| 103 | if ! defined $obj; | ||||
| 104 | |||||
| 105 | return $obj; | ||||
| 106 | } | ||||
| 107 | |||||
| 108 | |||||
| 109 | sub mkTrailer | ||||
| 110 | { | ||||
| 111 | my $self = shift ; | ||||
| 112 | return ''; | ||||
| 113 | } | ||||
| 114 | |||||
| 115 | sub mkFinalTrailer | ||||
| 116 | { | ||||
| 117 | return ''; | ||||
| 118 | } | ||||
| 119 | |||||
| 120 | #sub newHeader | ||||
| 121 | #{ | ||||
| 122 | # my $self = shift ; | ||||
| 123 | # return ''; | ||||
| 124 | #} | ||||
| 125 | |||||
| 126 | sub getInverseClass | ||||
| 127 | { | ||||
| 128 | return ('IO::Uncompress::Bunzip2'); | ||||
| 129 | } | ||||
| 130 | |||||
| 131 | sub getFileInfo | ||||
| 132 | { | ||||
| 133 | my $self = shift ; | ||||
| 134 | my $params = shift; | ||||
| 135 | my $file = shift ; | ||||
| 136 | |||||
| 137 | } | ||||
| 138 | |||||
| 139 | 1 | 13µs | 1; | ||
| 140 | |||||
| 141 | __END__ |