← Index
NYTProf Performance Profile   « block view • line view • sub view »
For t/app_dpath.t
  Run on Tue Jun 5 15:25:28 2012
Reported on Tue Jun 5 15:26:01 2012

Filename/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/x86_64-linux-thread-multi/Data/Structure/Util.pm
StatementsExecuted 27 statements in 4.98ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1119.39ms11.5msData::Structure::Util::::BEGIN@8Data::Structure::Util::BEGIN@8
1113.31ms4.78msData::Structure::Util::::BEGIN@9Data::Structure::Util::BEGIN@9
611518µs677µsData::Structure::Util::::unblessData::Structure::Util::unbless
111180µs180µsData::Structure::Util::::bootstrapData::Structure::Util::bootstrap (xsub)
611158µs158µsData::Structure::Util::::unbless_xsData::Structure::Util::unbless_xs (xsub)
11196µs96µsData::Structure::Util::::BEGIN@3Data::Structure::Util::BEGIN@3
11137µs543µsData::Structure::Util::::BEGIN@6Data::Structure::Util::BEGIN@6
11133µs289µsData::Structure::Util::::BEGIN@7Data::Structure::Util::BEGIN@7
11132µs51µsData::Structure::Util::::BEGIN@5Data::Structure::Util::BEGIN@5
0000s0sData::Structure::Util::::_utf8_offData::Structure::Util::_utf8_off
0000s0sData::Structure::Util::::_utf8_onData::Structure::Util::_utf8_on
0000s0sData::Structure::Util::::circular_offData::Structure::Util::circular_off
0000s0sData::Structure::Util::::get_blessedData::Structure::Util::get_blessed
0000s0sData::Structure::Util::::get_refsData::Structure::Util::get_refs
0000s0sData::Structure::Util::::has_circular_refData::Structure::Util::has_circular_ref
0000s0sData::Structure::Util::::has_utf8Data::Structure::Util::has_utf8
0000s0sData::Structure::Util::::signatureData::Structure::Util::signature
0000s0sData::Structure::Util::::utf8_offData::Structure::Util::utf8_off
0000s0sData::Structure::Util::::utf8_onData::Structure::Util::utf8_on
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Data::Structure::Util;
2
32191µs196µs
# spent 96µs within Data::Structure::Util::BEGIN@3 which was called: # once (96µs+0s) by main::BEGIN@13 at line 3
use 5.008;
# spent 96µs making 1 call to Data::Structure::Util::BEGIN@3
4
5296µs269µs
# spent 51µs (32+18) within Data::Structure::Util::BEGIN@5 which was called: # once (32µs+18µs) by main::BEGIN@13 at line 5
use strict;
# spent 51µs making 1 call to Data::Structure::Util::BEGIN@5 # spent 18µs making 1 call to strict::import
62128µs21.05ms
# spent 543µs (37+507) within Data::Structure::Util::BEGIN@6 which was called: # once (37µs+507µs) by main::BEGIN@13 at line 6
use warnings::register;
# spent 543µs making 1 call to Data::Structure::Util::BEGIN@6 # spent 507µs making 1 call to warnings::register::import
72110µs2545µs
# spent 289µs (33+256) within Data::Structure::Util::BEGIN@7 which was called: # once (33µs+256µs) by main::BEGIN@13 at line 7
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
# spent 289µs making 1 call to Data::Structure::Util::BEGIN@7 # spent 256µs making 1 call to vars::import
82781µs211.8ms
# spent 11.5ms (9.39+2.13) within Data::Structure::Util::BEGIN@8 which was called: # once (9.39ms+2.13ms) by main::BEGIN@13 at line 8
use Storable qw( freeze );
# spent 11.5ms making 1 call to Data::Structure::Util::BEGIN@8 # spent 295µs making 1 call to Exporter::import
922.27ms24.98ms
# spent 4.78ms (3.31+1.47) within Data::Structure::Util::BEGIN@9 which was called: # once (3.31ms+1.47ms) by main::BEGIN@13 at line 9
use Digest::MD5 qw( md5_hex );
# spent 4.78ms making 1 call to Data::Structure::Util::BEGIN@9 # spent 197µs making 1 call to Exporter::import
10
1112µsrequire Exporter;
121397µsrequire DynaLoader;
131370µsrequire AutoLoader;
14
15140µs@ISA = qw( Exporter DynaLoader );
16
1713µs$VERSION = '0.15';
18
1919µs@EXPORT_OK = qw(
20 unbless get_blessed get_refs has_circular_ref circular_off signature
21);
22
23114µsif ( $] >= 5.008 ) {
24 push @EXPORT_OK, qw(
25 has_utf8 utf8_off utf8_on _utf8_on _utf8_off
26 );
27}
28
29133µs11.13msbootstrap Data::Structure::Util $VERSION;
# spent 1.13ms making 1 call to DynaLoader::bootstrap
30
31sub has_utf8 {
32 has_utf8_xs( $_[0] ) ? $_[0] : undef;
33}
34
35sub utf8_off {
36 utf8_off_xs( $_[0] ) ? $_[0] : undef;
37}
38
39sub utf8_on {
40 utf8_on_xs( $_[0] ) ? $_[0] : undef;
41}
42
43sub _utf8_off {
44 _utf8_off_xs( $_[0] ) ? $_[0] : undef;
45}
46
47sub _utf8_on {
48 _utf8_on_xs( $_[0] ) ? $_[0] : undef;
49}
50
51
# spent 677µs (518+159) within Data::Structure::Util::unbless which was called 6 times, avg 113µs/call: # 6 times (518µs+159µs) by main::check at line 28 of t/app_dpath.t, avg 113µs/call
sub unbless {
526491µs6158µs unbless_xs( $_[0] );
# spent 158µs making 6 calls to Data::Structure::Util::unbless_xs, avg 26µs/call
53}
54
55sub get_blessed {
56 $_[0] or return [];
57 get_blessed_xs( $_[0] );
58}
59
60sub get_refs {
61 $_[0] or return [];
62 get_refs_xs( $_[0] );
63}
64
65sub has_circular_ref {
66 $_[0] or return $_[0];
67 has_circular_ref_xs( $_[0] );
68}
69
70# Need to hold another reference to the passed in value to avoid this
71# pathological case throwing an error
72# my $obj8 = [];
73# $obj8->[0] = \$obj8;
74# circular_off($obj8); # Used to throw an error
75
76sub circular_off {
77 my $r = $_[0];
78 $r or return $r;
79 circular_off_xs( $r );
80}
81
82sub signature {
83 return @_
84 ? md5_hex( freeze( [ $_[0], signature_xs( $_[0] ) ] ) )
85 : '0' x 32;
86}
87
88148µs1;
89
90__END__
 
# spent 180µs within Data::Structure::Util::bootstrap which was called: # once (180µs+0s) by DynaLoader::bootstrap at line 213 of DynaLoader.pm
sub Data::Structure::Util::bootstrap; # xsub
# spent 158µs within Data::Structure::Util::unbless_xs which was called 6 times, avg 26µs/call: # 6 times (158µs+0s) by Data::Structure::Util::unbless at line 52, avg 26µs/call
sub Data::Structure::Util::unbless_xs; # xsub