← Index
NYTProf Performance Profile   « line view »
For bin/benchmark-perlformance
  Run on Fri Apr 17 15:31:48 2015
Reported on Fri Apr 17 15:32:02 2015

Filename/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Data/DPath.pm
StatementsExecuted 27 statements in 621µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.59ms5.60msData::DPath::::BEGIN@50Data::DPath::BEGIN@50
111804µs47.1msData::DPath::::BEGIN@20Data::DPath::BEGIN@20
11184µs2.29msData::DPath::::__ANON__[:47]Data::DPath::__ANON__[:47]
21121µs1.65msData::DPath::::__ANON__[:27]Data::DPath::__ANON__[:27]
11110µs10µsData::DPath::::BEGIN@12Data::DPath::BEGIN@12
1117µs11µsData::DPath::::BEGIN@14Data::DPath::BEGIN@14
1117µs7µsData::DPath::::BEGIN@4Data::DPath::BEGIN@4
1116µs16µsData::DPath::::BEGIN@13Data::DPath::BEGIN@13
1115µs5µsData::DPath::::BEGIN@21Data::DPath::BEGIN@21
1113µs3µsData::DPath::::build_dpathData::DPath::build_dpath
1112µs2µsData::DPath::::build_dpathiData::DPath::build_dpathi
0000s0sData::DPath::::__ANON__[:34]Data::DPath::__ANON__[:34]
0000s0sData::DPath::::build_dpathrData::DPath::build_dpathr
0000s0sData::DPath::::matchData::DPath::match
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Data::DPath;
2# git description: v0.48-1-g9544ca0
3
4
# spent 7µs within Data::DPath::BEGIN@4 which was called: # once (7µs+0s) by Benchmark::Perl::Formance::BEGIN@17 at line 6
BEGIN {
516µs $Data::DPath::AUTHORITY = 'cpan:SCHWIGON';
6121µs17µs}
# spent 7µs making 1 call to Data::DPath::BEGIN@4
7{
82900ns $Data::DPath::VERSION = '0.49';
9}
10# ABSTRACT: DPath is not XPath!
11
12235µs110µs
# spent 10µs within Data::DPath::BEGIN@12 which was called: # once (10µs+0s) by Benchmark::Perl::Formance::BEGIN@17 at line 12
use 5.008;
# spent 10µs making 1 call to Data::DPath::BEGIN@12
13218µs225µs
# spent 16µs (6+10) within Data::DPath::BEGIN@13 which was called: # once (6µs+10µs) by Benchmark::Perl::Formance::BEGIN@17 at line 13
use strict;
# spent 16µs making 1 call to Data::DPath::BEGIN@13 # spent 10µs making 1 call to strict::import
14237µs215µs
# spent 11µs (7+4) within Data::DPath::BEGIN@14 which was called: # once (7µs+4µs) by Benchmark::Perl::Formance::BEGIN@17 at line 14
use warnings;
# spent 11µs making 1 call to Data::DPath::BEGIN@14 # spent 4µs making 1 call to warnings::import
15
161200nsour $DEBUG = 0;
171100nsour $USE_SAFE = 1;
181400nsour $PARALLELIZE = 0;
19
20277µs147.1ms
# spent 47.1ms (804µs+46.3) within Data::DPath::BEGIN@20 which was called: # once (804µs+46.3ms) by Benchmark::Perl::Formance::BEGIN@17 at line 20
use Data::DPath::Path;
# spent 47.1ms making 1 call to Data::DPath::BEGIN@20
212150µs15µs
# spent 5µs within Data::DPath::BEGIN@21 which was called: # once (5µs+0s) by Benchmark::Perl::Formance::BEGIN@17 at line 21
use Data::DPath::Context;
# spent 5µs making 1 call to Data::DPath::BEGIN@21
22
23
# spent 3µs within Data::DPath::build_dpath which was called: # once (3µs+0s) by Sub::Exporter::default_generator at line 419 of Sub/Exporter.pm
sub build_dpath {
24
# spent 1.65ms (21µs+1.63) within Data::DPath::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Data/DPath.pm:27] which was called 2 times, avg 824µs/call: # 2 times (21µs+1.63ms) by Benchmark::Perl::Formance::print_outstyle_summary at line 725 of lib/Benchmark/Perl/Formance.pm, avg 824µs/call
return sub ($) {
2522µs my ($path_str) = @_;
26218µs21.63ms Data::DPath::Path->new(path => $path_str);
# spent 1.63ms making 2 calls to Data::DPath::Path::new, avg 813µs/call
2715µs };
28}
29
30sub build_dpathr {
31 return sub ($) {
32 my ($path_str) = @_;
33 Data::DPath::Path->new(path => $path_str, give_references => 1);
34 };
35}
36
37
# spent 2µs within Data::DPath::build_dpathi which was called: # once (2µs+0s) by Sub::Exporter::default_generator at line 419 of Sub/Exporter.pm
sub build_dpathi {
38
# spent 2.29ms (84µs+2.21) within Data::DPath::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Data/DPath.pm:47] which was called: # once (84µs+2.21ms) by Benchmark::Perl::Formance::find_interesting_result_paths at line 698 of lib/Benchmark/Perl/Formance.pm
return sub ($) {
3912µs my ($data, $path_str) = @_;
40
411113µs82.21ms Data::DPath::Context
# spent 1.25ms making 1 call to Data::DPath::Context::_iter # spent 441µs making 1 call to Iterator::value # spent 410µs making 1 call to Data::DPath::Path::new # spent 64µs making 1 call to Data::DPath::Context::_search # spent 24µs making 1 call to Data::DPath::Context::new # spent 8µs making 1 call to Data::DPath::Point::new # spent 6µs making 1 call to Data::DPath::Point::ref # spent 4µs making 1 call to Data::DPath::Context::current_points
42 ->new
43 ->current_points([ Data::DPath::Point->new->ref(\$data) ])
44 ->_search(Data::DPath::Path->new(path => "/"))
45 ->_iter
46 ->value; # there is always exactly one root "/"
4714µs };
48}
49
5019µs1290µs
# spent 5.60ms (1.59+4.01) within Data::DPath::BEGIN@50 which was called: # once (1.59ms+4.01ms) by Benchmark::Perl::Formance::BEGIN@17 at line 56
use Sub::Exporter -setup => {
# spent 290µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337]
51 exports => [ dpath => \&build_dpath,
52 dpathr => \&build_dpathr,
53 dpathi => \&build_dpathi,
54 ],
55 groups => { all => [ 'dpath', 'dpathr' ] },
561120µs15.60ms };
# spent 5.60ms making 1 call to Data::DPath::BEGIN@50
57
58sub match {
59 my ($class, $data, $path_str) = @_;
60 Data::DPath::Path->new(path => $path_str)->match($data);
61}
62
63# ------------------------------------------------------------
64
6513µs1;
66
67__END__