← 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/BenchmarkAnything/Config.pm
StatementsExecuted 29 statements in 359µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.48ms37.9msBenchmarkAnything::Config::::_read_config BenchmarkAnything::Config::_read_config
11116µs16µsBenchmarkAnything::Storage::Frontend::Lib::::BEGIN@1BenchmarkAnything::Storage::Frontend::Lib::BEGIN@1
11113µs13µsBenchmarkAnything::Config::::CORE:open BenchmarkAnything::Config::CORE:open (opcode)
1117µs9µsBenchmarkAnything::Storage::Frontend::Lib::::BEGIN@2BenchmarkAnything::Storage::Frontend::Lib::BEGIN@2
1116µs37.9msBenchmarkAnything::Config::::new BenchmarkAnything::Config::new
1116µs6µsBenchmarkAnything::Config::::CORE:readline BenchmarkAnything::Config::CORE:readline (opcode)
1115µs13µsBenchmarkAnything::Storage::Frontend::Lib::::BEGIN@3BenchmarkAnything::Storage::Frontend::Lib::BEGIN@3
1113µs3µsBenchmarkAnything::Config::::BEGIN@5 BenchmarkAnything::Config::BEGIN@5
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1240µs116µs
# spent 16µs within BenchmarkAnything::Storage::Frontend::Lib::BEGIN@1 which was called: # once (16µs+0s) by BenchmarkAnything::Storage::Frontend::Lib::new at line 1
use 5.008;
2214µs212µs
# spent 9µs (7+3) within BenchmarkAnything::Storage::Frontend::Lib::BEGIN@2 which was called: # once (7µs+3µs) by BenchmarkAnything::Storage::Frontend::Lib::new at line 2
use strict;
# spent 9µs making 1 call to BenchmarkAnything::Storage::Frontend::Lib::BEGIN@2 # spent 3µs making 1 call to strict::import
3223µs220µs
# spent 13µs (5+8) within BenchmarkAnything::Storage::Frontend::Lib::BEGIN@3 which was called: # once (5µs+8µs) by BenchmarkAnything::Storage::Frontend::Lib::new at line 3
use warnings;
# spent 13µs making 1 call to BenchmarkAnything::Storage::Frontend::Lib::BEGIN@3 # spent 8µs making 1 call to warnings::import
4package BenchmarkAnything::Config;
5
# spent 3µs within BenchmarkAnything::Config::BEGIN@5 which was called: # once (3µs+0s) by BenchmarkAnything::Storage::Frontend::Lib::new at line 7
BEGIN {
613µs $BenchmarkAnything::Config::AUTHORITY = 'cpan:SCHWIGON';
71120µs13µs}
# spent 3µs making 1 call to BenchmarkAnything::Config::BEGIN@5
8# ABSTRACT: Read BenchmarkAnything configfile
91300ns$BenchmarkAnything::Config::VERSION = '0.003';
10
11sub new
12
# spent 37.9ms (6µs+37.9) within BenchmarkAnything::Config::new which was called: # once (6µs+37.9ms) by BenchmarkAnything::Storage::Frontend::Lib::new at line 18 of BenchmarkAnything/Storage/Frontend/Lib.pm
{
131300ns my $class = shift;
1411µs my $self = bless { @_ }, $class;
151700ns137.9ms $self->_read_config;
# spent 37.9ms making 1 call to BenchmarkAnything::Config::_read_config
1613µs return $self;
17}
18
19
20sub _read_config
21
# spent 37.9ms (1.48+36.4) within BenchmarkAnything::Config::_read_config which was called: # once (1.48ms+36.4ms) by BenchmarkAnything::Config::new at line 15
{
221300ns my ($self) = @_;
23
24137µs require File::HomeDir;
25143µs require YAML::Any;
26
27 # don't look into user's homedir if we are running tests
2812µs my $default_cfgfile = $ENV{HARNESS_ACTIVE} ? "t/benchmarkanything.cfg" : $ENV{BENCHMARKANYTHING_CONFIGFILE} || File::HomeDir->my_home . "/.benchmarkanything/default.cfg";
29
30 # read file
311700ns eval {
3218µs $self->{cfgfile} = $self->{cfgfile} || $default_cfgfile;
331300ns my $cfg_yaml;
34120µs113µs open (my $CFG, "<", $self->{cfgfile}) or die "Can't read: ".$self->{cfgfile}."\n";
# spent 13µs making 1 call to BenchmarkAnything::Config::CORE:open
35 {
3622µs local $/;
37110µs16µs $cfg_yaml = <$CFG>;
# spent 6µs making 1 call to BenchmarkAnything::Config::CORE:readline
38 }
3914µs132.1ms my $config = YAML::Any::Load($cfg_yaml);
# spent 32.1ms making 1 call to YAML::Any::Load
40118µs $self->{benchmarkanything} = $config->{benchmarkanything};
41 };
421300ns if ($@)
43 {
44 die "benchmarkanything: error loading configfile: $@\n";
45 }
46
47 # defaults
4811µs $self->{benchmarkanything}{backend} ||= 'local';
49
5014µs return $self;
51}
52
5312µs1;
54
55__END__
 
# spent 13µs within BenchmarkAnything::Config::CORE:open which was called: # once (13µs+0s) by BenchmarkAnything::Config::_read_config at line 34
sub BenchmarkAnything::Config::CORE:open; # opcode
# spent 6µs within BenchmarkAnything::Config::CORE:readline which was called: # once (6µs+0s) by BenchmarkAnything::Config::_read_config at line 37
sub BenchmarkAnything::Config::CORE:readline; # opcode