Filename | /usr/share/perl5/CGI/Session/Serialize/yaml.pm |
Statements | Executed 21 statements in 434µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
3 | 1 | 1 | 106µs | 482µs | freeze | CGI::Session::Serialize::yaml::
1 | 1 | 1 | 23µs | 29µs | BEGIN@3 | CGI::Session::Serialize::yaml::
1 | 1 | 1 | 12µs | 14µs | BEGIN@4 | CGI::Session::Serialize::yaml::
0 | 0 | 0 | 0s | 0s | thaw | CGI::Session::Serialize::yaml::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package CGI::Session::Serialize::yaml; | ||||
2 | |||||
3 | 3 | 35µs | 2 | 35µs | # spent 29µs (23+6) within CGI::Session::Serialize::yaml::BEGIN@3 which was called:
# once (23µs+6µs) by CGI::Session::_load_pluggables at line 3 # spent 29µs making 1 call to CGI::Session::Serialize::yaml::BEGIN@3
# spent 6µs making 1 call to strict::import |
4 | 3 | 178µs | 2 | 17µs | # spent 14µs (12+2) within CGI::Session::Serialize::yaml::BEGIN@4 which was called:
# once (12µs+2µs) by CGI::Session::_load_pluggables at line 4 # spent 14µs making 1 call to CGI::Session::Serialize::yaml::BEGIN@4
# spent 2µs making 1 call to UNIVERSAL::import |
5 | |||||
6 | 1 | 1µs | $CGI::Session::Serialize::yaml::VERSION = '4.24'; | ||
7 | 1 | 10µs | @CGI::Session::Serialize::yaml::ISA = ( "CGI::Session::ErrorHandler" ); | ||
8 | 1 | 200ns | our $Flavour; | ||
9 | |||||
10 | 1 | 700ns | unless($Flavour) { | ||
11 | 3 | 69µs | my $package = (grep { eval("use $_ (); 1;") } qw(YAML::Syck YAML))[0] # spent 21µs executing statements in string eval # includes 11µs spent executing 1 call to 1 sub defined therein. # spent 19µs executing statements in string eval # includes 10µ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 | 500ns | $Flavour = $package; | ||
14 | } | ||||
15 | |||||
16 | # spent 482µs (106+376) within CGI::Session::Serialize::yaml::freeze which was called 3 times, avg 161µs/call:
# 3 times (106µs+376µs) by CGI::Session::flush at line 249 of CGI/Session.pm, avg 161µs/call | ||||
17 | 6 | 133µs | my ($self, $data) = @_; | ||
18 | 6 | 376µs | return $Flavour->can('Dump')->($data); # spent 350µs making 3 calls to YAML::Syck::Dump, avg 117µs/call
# spent 26µs making 3 calls to UNIVERSAL::can, avg 9µs/call | ||
19 | } | ||||
20 | |||||
21 | |||||
22 | sub thaw { | ||||
23 | my ($self, $string) = @_; | ||||
24 | return ($Flavour->can('Load')->($string))[0]; | ||||
25 | } | ||||
26 | |||||
27 | 1 | 6µs | 1; | ||
28 | |||||
29 | __END__; |