| Filename | /usr/share/perl5/CGI/Session/Serialize/yaml.pm |
| Statements | Executed 21 statements in 868µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 1 | 1 | 66µs | 340µs | CGI::Session::Serialize::yaml::thaw |
| 1 | 1 | 1 | 26µs | 37µs | CGI::Session::Serialize::yaml::BEGIN@3 |
| 2 | 1 | 1 | 19µs | 167µs | CGI::Session::Serialize::yaml::freeze |
| 1 | 1 | 1 | 6µs | 6µs | CGI::Session::Serialize::yaml::BEGIN@4 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package CGI::Session::Serialize::yaml; | ||||
| 2 | |||||
| 3 | 2 | 50µs | 2 | 48µs | # spent 37µs (26+11) within CGI::Session::Serialize::yaml::BEGIN@3 which was called:
# once (26µs+11µs) by CGI::Session::_load_pluggables at line 3 # spent 37µs making 1 call to CGI::Session::Serialize::yaml::BEGIN@3
# spent 11µs making 1 call to strict::import |
| 4 | 2 | 184µs | 1 | 6µs | # spent 6µs within CGI::Session::Serialize::yaml::BEGIN@4 which was called:
# once (6µs+0s) by CGI::Session::_load_pluggables at line 4 # spent 6µs making 1 call to CGI::Session::Serialize::yaml::BEGIN@4 |
| 5 | |||||
| 6 | 1 | 400ns | $CGI::Session::Serialize::yaml::VERSION = '4.26'; | ||
| 7 | 1 | 6µs | @CGI::Session::Serialize::yaml::ISA = ( "CGI::Session::ErrorHandler" ); | ||
| 8 | 1 | 100ns | our $Flavour; | ||
| 9 | |||||
| 10 | 1 | 300ns | unless($Flavour) { | ||
| 11 | 3 | 56µs | my $package = (grep { eval("use $_ (); 1;") } qw(YAML::Syck YAML))[0] # spent 14µs executing statements in string eval # includes 8µs spent executing 1 call to 1 sub defined therein. # spent 12µs executing statements in string eval # includes 6µs spent executing 1 call to 1 sub defined therein. | ||
| 12 | or die "Either YAML::Syck or YAML are required to use ", __PACKAGE__; | ||||
| 13 | 1 | 400ns | $Flavour = $package; | ||
| 14 | } | ||||
| 15 | |||||
| 16 | # spent 167µs (19+148) within CGI::Session::Serialize::yaml::freeze which was called 2 times, avg 84µs/call:
# 2 times (19µs+148µs) by CGI::Session::flush at line 247 of CGI/Session.pm, avg 84µs/call | ||||
| 17 | 2 | 1µs | my ($self, $data) = @_; | ||
| 18 | 2 | 168µs | 4 | 148µs | return $Flavour->can('Dump')->($data); # spent 136µs making 2 calls to YAML::Syck::Dump, avg 68µs/call
# spent 12µs making 2 calls to UNIVERSAL::can, avg 6µs/call |
| 19 | } | ||||
| 20 | |||||
| 21 | |||||
| 22 | # spent 340µs (66+273) within CGI::Session::Serialize::yaml::thaw which was called 2 times, avg 170µs/call:
# 2 times (66µs+273µs) by CGI::Session::load at line 728 of CGI/Session.pm, avg 170µs/call | ||||
| 23 | 2 | 900ns | my ($self, $string) = @_; | ||
| 24 | 2 | 395µs | 4 | 273µs | return ($Flavour->can('Load')->($string))[0]; # spent 264µs making 2 calls to YAML::Syck::Load, avg 132µs/call
# spent 9µs making 2 calls to UNIVERSAL::can, avg 5µs/call |
| 25 | } | ||||
| 26 | |||||
| 27 | 1 | 4µs | 1; | ||
| 28 | |||||
| 29 | __END__; |