| Filename | /usr/share/perl5/CGI/Session/Serialize/yaml.pm |
| Statements | Executed 21 statements in 599µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 3 | 1 | 1 | 76µs | 530µs | CGI::Session::Serialize::yaml::freeze |
| 1 | 1 | 1 | 33µs | 40µs | CGI::Session::Serialize::yaml::BEGIN@3 |
| 1 | 1 | 1 | 12µs | 12µs | CGI::Session::Serialize::yaml::BEGIN@4 |
| 0 | 0 | 0 | 0s | 0s | CGI::Session::Serialize::yaml::thaw |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package CGI::Session::Serialize::yaml; | ||||
| 2 | |||||
| 3 | 3 | 62µs | 2 | 48µs | # spent 40µs (33+8) within CGI::Session::Serialize::yaml::BEGIN@3 which was called:
# once (33µs+8µs) by CGI::Session::_load_pluggables at line 3 # spent 40µs making 1 call to CGI::Session::Serialize::yaml::BEGIN@3
# spent 8µs making 1 call to strict::import |
| 4 | 3 | 296µs | 1 | 12µs | # spent 12µs within CGI::Session::Serialize::yaml::BEGIN@4 which was called:
# once (12µs+0s) by CGI::Session::_load_pluggables at line 4 # spent 12µs making 1 call to CGI::Session::Serialize::yaml::BEGIN@4 |
| 5 | |||||
| 6 | 1 | 2µs | $CGI::Session::Serialize::yaml::VERSION = '4.24'; | ||
| 7 | 1 | 17µs | @CGI::Session::Serialize::yaml::ISA = ( "CGI::Session::ErrorHandler" ); | ||
| 8 | 1 | 300ns | our $Flavour; | ||
| 9 | |||||
| 10 | 3 | 7µs | unless($Flavour) { | ||
| 11 | 2 | 109µs | my $package = (grep { eval("use $_ (); 1;") } qw(YAML::Syck YAML))[0] # spent 30µs executing statements in string eval # includes 16µs spent executing 1 call to 1 sub defined therein. # spent 28µs executing statements in string eval # includes 13µs spent executing 1 call to 1 sub defined therein. | ||
| 12 | or die "Either YAML::Syck or YAML are required to use ", __PACKAGE__; | ||||
| 13 | $Flavour = $package; | ||||
| 14 | } | ||||
| 15 | |||||
| 16 | # spent 530µs (76+455) within CGI::Session::Serialize::yaml::freeze which was called 3 times, avg 177µs/call:
# 3 times (76µs+455µs) by CGI::Session::flush at line 249 of CGI/Session.pm, avg 177µs/call | ||||
| 17 | 6 | 96µs | my ($self, $data) = @_; | ||
| 18 | 6 | 454µs | return $Flavour->can('Dump')->($data); # spent 436µs making 3 calls to YAML::Syck::Dump, avg 145µs/call
# spent 18µs making 3 calls to UNIVERSAL::can, avg 6µs/call | ||
| 19 | } | ||||
| 20 | |||||
| 21 | |||||
| 22 | sub thaw { | ||||
| 23 | my ($self, $string) = @_; | ||||
| 24 | return ($Flavour->can('Load')->($string))[0]; | ||||
| 25 | } | ||||
| 26 | |||||
| 27 | 1 | 10µs | 1; | ||
| 28 | |||||
| 29 | __END__; |