← Index
NYTProf Performance Profile   « line view »
For /home/ss5/perl5/perlbrew/perls/perl-5.22.0/bin/benchmarkanything-storage
  Run on Mon Jan 29 16:55:34 2018
Reported on Mon Jan 29 16:57:07 2018

Filename/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/YAML/Any.pm
StatementsExecuted 50 statements in 776µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111668µs31.8msYAML::Any::::implementation YAML::Any::implementation
11123µs32.1msYAML::Any::::Load YAML::Any::Load
11120µs22µsBenchmarkAnything::Config::::BEGIN@1BenchmarkAnything::Config::BEGIN@1
1116µs18µsYAML::Any::::BEGIN@48 YAML::Any::BEGIN@48
1116µs12µsBenchmarkAnything::Config::::BEGIN@1.27BenchmarkAnything::Config::BEGIN@1.27
1115µs11µsYAML::Any::::BEGIN@87 YAML::Any::BEGIN@87
1115µs11µsYAML::Any::::BEGIN@61 YAML::Any::BEGIN@61
1115µs17µsYAML::Any::::BEGIN@49 YAML::Any::BEGIN@49
1114µs10µsYAML::Any::::BEGIN@74 YAML::Any::BEGIN@74
1114µs9µsYAML::Any::::BEGIN@88 YAML::Any::BEGIN@88
1114µs9µsYAML::Any::::BEGIN@75 YAML::Any::BEGIN@75
1114µs9µsYAML::Any::::BEGIN@62 YAML::Any::BEGIN@62
1112µs2µsYAML::Any::::BEGIN@5 YAML::Any::BEGIN@5
1112µs2µsYAML::Any::::CORE:subst YAML::Any::CORE:subst (opcode)
1111µs1µsYAML::Any::::order YAML::Any::order
0000s0sYAML::Any::::Dump YAML::Any::Dump
0000s0sYAML::Any::::DumpFile YAML::Any::DumpFile
0000s0sYAML::Any::::LoadFile YAML::Any::LoadFile
0000s0sYAML::Any::::croak YAML::Any::croak
0000s0sYAML::Any::::import YAML::Any::import
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1442µs444µs
# spent 12µs (6+7) within BenchmarkAnything::Config::BEGIN@1.27 which was called: # once (6µs+7µs) by BenchmarkAnything::Config::_read_config at line 1 # spent 22µs (20+2) within BenchmarkAnything::Config::BEGIN@1 which was called: # once (20µs+2µs) by BenchmarkAnything::Config::_read_config at line 1
use strict; use warnings;
# spent 22µs making 1 call to BenchmarkAnything::Config::BEGIN@1 # spent 12µs making 1 call to BenchmarkAnything::Config::BEGIN@1.27 # spent 7µs making 1 call to warnings::import # spent 2µs making 1 call to strict::import
2package YAML::Any;
31300nsour $VERSION = '1.15';
4
5268µs12µs
# spent 2µs within YAML::Any::BEGIN@5 which was called: # once (2µs+0s) by BenchmarkAnything::Config::_read_config at line 5
use Exporter ();
# spent 2µs making 1 call to YAML::Any::BEGIN@5
6
716µs@YAML::Any::ISA = 'Exporter';
81400ns@YAML::Any::EXPORT = qw(Dump Load);
91300ns@YAML::Any::EXPORT_OK = qw(DumpFile LoadFile);
10
111900nsmy @dump_options = qw(
12 UseCode
13 DumpCode
14 SpecVersion
15 Indent
16 UseHeader
17 UseVersion
18 SortKeys
19 AnchorPrefix
20 UseBlock
21 UseFold
22 CompressSeries
23 InlineSeries
24 UseAliases
25 Purity
26 Stringify
27);
28
291200nsmy @load_options = qw(
30 UseCode
31 LoadCode
32);
33
341400nsmy @implementations = qw(
35 YAML::XS
36 YAML::Syck
37 YAML::Old
38 YAML
39 YAML::Tiny
40);
41
42sub import {
43 __PACKAGE__->implementation;
44 goto &Exporter::import;
45}
46
47sub Dump {
48214µs229µs
# spent 18µs (6+11) within YAML::Any::BEGIN@48 which was called: # once (6µs+11µs) by BenchmarkAnything::Config::_read_config at line 48
no strict 'refs';
# spent 18µs making 1 call to YAML::Any::BEGIN@48 # spent 11µs making 1 call to strict::unimport
49274µs229µs
# spent 17µs (5+12) within YAML::Any::BEGIN@49 which was called: # once (5µs+12µs) by BenchmarkAnything::Config::_read_config at line 49
no warnings 'once';
# spent 17µs making 1 call to YAML::Any::BEGIN@49 # spent 12µs making 1 call to warnings::unimport
50 my $implementation = __PACKAGE__->implementation;
51 for my $option (@dump_options) {
52 my $var = "$implementation\::$option";
53 my $value = $$var;
54 local $$var;
55 $$var = defined $value ? $value : ${"YAML::$option"};
56 }
57 return &{"$implementation\::Dump"}(@_);
58}
59
60sub DumpFile {
61213µs216µs
# spent 11µs (5+6) within YAML::Any::BEGIN@61 which was called: # once (5µs+6µs) by BenchmarkAnything::Config::_read_config at line 61
no strict 'refs';
# spent 11µs making 1 call to YAML::Any::BEGIN@61 # spent 6µs making 1 call to strict::unimport
62262µs215µs
# spent 9µs (4+6) within YAML::Any::BEGIN@62 which was called: # once (4µs+6µs) by BenchmarkAnything::Config::_read_config at line 62
no warnings 'once';
# spent 9µs making 1 call to YAML::Any::BEGIN@62 # spent 6µs making 1 call to warnings::unimport
63 my $implementation = __PACKAGE__->implementation;
64 for my $option (@dump_options) {
65 my $var = "$implementation\::$option";
66 my $value = $$var;
67 local $$var;
68 $$var = defined $value ? $value : ${"YAML::$option"};
69 }
70 return &{"$implementation\::DumpFile"}(@_);
71}
72
73
# spent 32.1ms (23µs+32.1) within YAML::Any::Load which was called: # once (23µs+32.1ms) by BenchmarkAnything::Config::_read_config at line 39 of BenchmarkAnything/Config.pm
sub Load {
74213µs216µs
# spent 10µs (4+6) within YAML::Any::BEGIN@74 which was called: # once (4µs+6µs) by BenchmarkAnything::Config::_read_config at line 74
no strict 'refs';
# spent 10µs making 1 call to YAML::Any::BEGIN@74 # spent 6µs making 1 call to strict::unimport
75256µs214µs
# spent 9µs (4+5) within YAML::Any::BEGIN@75 which was called: # once (4µs+5µs) by BenchmarkAnything::Config::_read_config at line 75
no warnings 'once';
# spent 9µs making 1 call to YAML::Any::BEGIN@75 # spent 5µs making 1 call to warnings::unimport
7613µs131.8ms my $implementation = __PACKAGE__->implementation;
# spent 31.8ms making 1 call to YAML::Any::implementation
7712µs for my $option (@load_options) {
7821µs my $var = "$implementation\::$option";
7923µs my $value = $$var;
802900ns local $$var;
8124µs $$var = defined $value ? $value : ${"YAML::$option"};
82 }
831212µs1204µs return &{"$implementation\::Load"}(@_);
# spent 204µs making 1 call to YAML::XS::LibYAML::Load
84}
85
86sub LoadFile {
87215µs216µs
# spent 11µs (5+6) within YAML::Any::BEGIN@87 which was called: # once (5µs+6µs) by BenchmarkAnything::Config::_read_config at line 87
no strict 'refs';
# spent 11µs making 1 call to YAML::Any::BEGIN@87 # spent 6µs making 1 call to strict::unimport
882147µs213µs
# spent 9µs (4+5) within YAML::Any::BEGIN@88 which was called: # once (4µs+5µs) by BenchmarkAnything::Config::_read_config at line 88
no warnings 'once';
# spent 9µs making 1 call to YAML::Any::BEGIN@88 # spent 5µs making 1 call to warnings::unimport
89 my $implementation = __PACKAGE__->implementation;
90 for my $option (@load_options) {
91 my $var = "$implementation\::$option";
92 my $value = $$var;
93 local $$var;
94 $$var = defined $value ? $value : ${"YAML::$option"};
95 }
96 return &{"$implementation\::LoadFile"}(@_);
97}
98
99
# spent 1µs within YAML::Any::order which was called: # once (1µs+0s) by YAML::Any::implementation at line 106
sub order {
100 return @YAML::Any::_TEST_ORDER
1011300ns if @YAML::Any::_TEST_ORDER;
10212µs return @implementations;
103}
104
105
# spent 31.8ms (668µs+31.2) within YAML::Any::implementation which was called: # once (668µs+31.2ms) by YAML::Any::Load at line 76
sub implementation {
10611µs11µs my @order = __PACKAGE__->order;
# spent 1µs making 1 call to YAML::Any::order
1071500ns for my $module (@order) {
1081200ns my $path = $module;
10914µs12µs $path =~ s/::/\//g;
# spent 2µs making 1 call to YAML::Any::CORE:subst
1101300ns $path .= '.pm';
1111500ns return $module if exists $INC{$path};
112124µs eval "require $module; 1" and return $module;
# spent 38µs executing statements in string eval
113 }
114 croak("YAML::Any couldn't find any of these YAML implementations: @order");
115}
116
117sub croak {
118 require Carp;
119 Carp::croak(@_);
120}
121
12214µs1;
 
# spent 2µs within YAML::Any::CORE:subst which was called: # once (2µs+0s) by YAML::Any::implementation at line 109
sub YAML::Any::CORE:subst; # opcode