← Index
NYTProf Performance Profile   « line view »
For script/ponapi
  Run on Wed Feb 10 15:51:26 2016
Reported on Thu Feb 11 09:43:12 2016

Filename/usr/lib/perl/5.18/Time/HiRes.pm
StatementsExecuted 26 statements in 473µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
600006211.52s1.52sTime::HiRes::::alarmTime::HiRes::alarm (xsub)
30000311544ms544msTime::HiRes::::timeTime::HiRes::time (xsub)
11139µs39µsTime::HiRes::::bootstrapTime::HiRes::bootstrap (xsub)
22119µs234µsTime::HiRes::::importTime::HiRes::import
11115µs15µsTime::HiRes::::BEGIN@3Time::HiRes::BEGIN@3
1119µs19µsTime::HiRes::::BEGIN@43Time::HiRes::BEGIN@43
1118µs18µsTime::HiRes::::BEGIN@4Time::HiRes::BEGIN@4
0000s0sTime::HiRes::::AUTOLOADTime::HiRes::AUTOLOAD
0000s0sTime::HiRes::::__ANON__[:44]Time::HiRes::__ANON__[:44]
0000s0sTime::HiRes::::tv_intervalTime::HiRes::tv_interval
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Time::HiRes;
2
3340µs115µs
# spent 15µs within Time::HiRes::BEGIN@3 which was called: # once (15µs+0s) by HTTP::Server::PSGI::BEGIN@19 at line 3
{ use 5.006; }
# spent 15µs making 1 call to Time::HiRes::BEGIN@3
42167µs229µs
# spent 18µs (8+11) within Time::HiRes::BEGIN@4 which was called: # once (8µs+11µs) by HTTP::Server::PSGI::BEGIN@19 at line 4
use strict;
# spent 18µs making 1 call to Time::HiRes::BEGIN@4 # spent 11µs making 1 call to strict::import
5
61400nsrequire Exporter;
71700nsrequire DynaLoader;
8
917µsour @ISA = qw(Exporter DynaLoader);
10
111300nsour @EXPORT = qw( );
1214µsour @EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval
13 getitimer setitimer nanosleep clock_gettime clock_getres
14 clock clock_nanosleep
15 CLOCK_HIGHRES CLOCK_MONOTONIC CLOCK_PROCESS_CPUTIME_ID
16 CLOCK_REALTIME CLOCK_SOFTTIME CLOCK_THREAD_CPUTIME_ID
17 CLOCK_TIMEOFDAY CLOCKS_PER_SEC
18 ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF
19 TIMER_ABSTIME
20 d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
21 d_nanosleep d_clock_gettime d_clock_getres
22 d_clock d_clock_nanosleep
23 stat
24 );
25
261200nsour $VERSION = '1.9725';
271100nsour $XS_VERSION = $VERSION;
28111µs$VERSION = eval $VERSION;
# spent 2µs executing statements in string eval
29
3010sour $AUTOLOAD;
31sub AUTOLOAD {
32 my $constname;
33 ($constname = $AUTOLOAD) =~ s/.*:://;
34 # print "AUTOLOAD: constname = $constname ($AUTOLOAD)\n";
35 die "&Time::HiRes::constant not defined" if $constname eq 'constant';
36 my ($error, $val) = constant($constname);
37 # print "AUTOLOAD: error = $error, val = $val\n";
38 if ($error) {
39 my (undef,$file,$line) = caller;
40 die "$error at $file line $line.\n";
41 }
42 {
432214µs229µs
# spent 19µs (9+10) within Time::HiRes::BEGIN@43 which was called: # once (9µs+10µs) by HTTP::Server::PSGI::BEGIN@19 at line 43
no strict 'refs';
# spent 19µs making 1 call to Time::HiRes::BEGIN@43 # spent 10µs making 1 call to strict::unimport
44 *$AUTOLOAD = sub { $val };
45 }
46 goto &$AUTOLOAD;
47}
48
49
# spent 234µs (19+215) within Time::HiRes::import which was called 2 times, avg 117µs/call: # once (13µs+165µs) by HTTP::Server::PSGI::BEGIN@19 at line 19 of HTTP/Server/PSGI.pm # once (6µs+50µs) by HTTP::Server::PSGI::BEGIN@22 at line 26 of HTTP/Server/PSGI.pm
sub import {
502800ns my $this = shift;
5121µs for my $i (@_) {
5222µs if (($i eq 'clock_getres' && !&d_clock_getres) ||
53 ($i eq 'clock_gettime' && !&d_clock_gettime) ||
54 ($i eq 'clock_nanosleep' && !&d_clock_nanosleep) ||
55 ($i eq 'clock' && !&d_clock) ||
56 ($i eq 'nanosleep' && !&d_nanosleep) ||
57 ($i eq 'usleep' && !&d_usleep) ||
58 ($i eq 'ualarm' && !&d_ualarm)) {
59 require Carp;
60 Carp::croak("Time::HiRes::$i(): unimplemented in this platform");
61 }
62 }
63212µs227µs Time::HiRes->export_to_level(1, $this, @_);
# spent 27µs making 2 calls to Exporter::export_to_level, avg 13µs/call
64}
65
6616µs1217µsbootstrap Time::HiRes;
# spent 217µs making 1 call to DynaLoader::bootstrap
67
68# Preloaded methods go here.
69
70sub tv_interval {
71 # probably could have been done in C
72 my ($a, $b) = @_;
73 $b = [gettimeofday()] unless defined($b);
74 (${$b}[0] - ${$a}[0]) + ((${$b}[1] - ${$a}[1]) / 1_000_000);
75}
76
77# Autoload methods go after =cut, and are processed by the autosplit program.
78
7917µs1;
80__END__
 
# spent 1.52s within Time::HiRes::alarm which was called 600006 times, avg 3µs/call: # 300003 times (924ms+0s) by HTTP::Server::PSGI::do_timeout at line 249 of HTTP/Server/PSGI.pm, avg 3µs/call # 300003 times (600ms+0s) by HTTP::Server::PSGI::do_timeout at line 263 of HTTP/Server/PSGI.pm, avg 2µs/call
sub Time::HiRes::alarm; # xsub
# spent 39µs within Time::HiRes::bootstrap which was called: # once (39µs+0s) by DynaLoader::bootstrap at line 207 of DynaLoader.pm
sub Time::HiRes::bootstrap; # xsub
# spent 544ms within Time::HiRes::time which was called 300003 times, avg 2µs/call: # 300003 times (544ms+0s) by HTTP::Server::PSGI::do_timeout at line 248 of HTTP/Server/PSGI.pm, avg 2µs/call
sub Time::HiRes::time; # xsub