← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/hailo
  Run on Thu Oct 21 22:50:37 2010
Reported on Thu Oct 21 22:52:15 2010

Filename/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/x86_64-linux/Time/HiRes.pm
StatementsExecuted 28 statements in 546µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
250012168.4ms68.4msTime::HiRes::::timeTime::HiRes::time (xsub)
11152µs52µsTime::HiRes::::bootstrapTime::HiRes::bootstrap (xsub)
22246µs516µsTime::HiRes::::importTime::HiRes::import
11124µs29µsTime::HiRes::::BEGIN@3Time::HiRes::BEGIN@3
11116µs20µsTime::HiRes::::tv_intervalTime::HiRes::tv_interval
11113µs162µsTime::HiRes::::BEGIN@4Time::HiRes::BEGIN@4
11112µs37µsTime::HiRes::::BEGIN@42Time::HiRes::BEGIN@42
22210µs10µsTime::HiRes::::gettimeofdayTime::HiRes::gettimeofday (xsub)
0000s0sTime::HiRes::::AUTOLOADTime::HiRes::AUTOLOAD
0000s0sTime::HiRes::::__ANON__[:43]Time::HiRes::__ANON__[:43]
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
3232µs234µs
# spent 29µs (24+5) within Time::HiRes::BEGIN@3 which was called: # once (24µs+5µs) by Term::Sk::BEGIN@6 at line 3
use strict;
# spent 29µs making 1 call to Time::HiRes::BEGIN@3 # spent 5µs making 1 call to strict::import
42175µs2311µs
# spent 162µs (13+149) within Time::HiRes::BEGIN@4 which was called: # once (13µs+149µs) by Term::Sk::BEGIN@6 at line 4
use vars qw($VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
# spent 162µs making 1 call to Time::HiRes::BEGIN@4 # spent 149µs making 1 call to vars::import
5
612µsrequire Exporter;
712µsrequire DynaLoader;
8
9110µs@ISA = qw(Exporter DynaLoader);
10
111800ns@EXPORT = qw( );
1216µs@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
2611µs$VERSION = '1.9721';
2711µs$XS_VERSION = $VERSION;
28114µs$VERSION = eval $VERSION;
# spent 3µs executing statements in string eval
29
30sub AUTOLOAD {
31 my $constname;
32 ($constname = $AUTOLOAD) =~ s/.*:://;
33 # print "AUTOLOAD: constname = $constname ($AUTOLOAD)\n";
34 die "&Time::HiRes::constant not defined" if $constname eq 'constant';
35 my ($error, $val) = constant($constname);
36 # print "AUTOLOAD: error = $error, val = $val\n";
37 if ($error) {
38 my (undef,$file,$line) = caller;
39 die "$error at $file line $line.\n";
40 }
41 {
422226µs262µs
# spent 37µs (12+25) within Time::HiRes::BEGIN@42 which was called: # once (12µs+25µs) by Term::Sk::BEGIN@6 at line 42
no strict 'refs';
# spent 37µs making 1 call to Time::HiRes::BEGIN@42 # spent 25µs making 1 call to strict::unimport
43 *$AUTOLOAD = sub { $val };
44 }
45 goto &$AUTOLOAD;
46}
47
48
# spent 516µs (46+469) within Time::HiRes::import which was called 2 times, avg 258µs/call: # once (22µs+331µs) by Term::Sk::BEGIN@6 at line 6 of Term/Sk.pm # once (24µs+138µs) by Hailo::Command::__ANON__[lib/Hailo/Command.pm:307] at line 305 of lib/Hailo/Command.pm
sub import {
4923µs my $this = shift;
5026µs for my $i (@_) {
5139µs if (($i eq 'clock_getres' && !&d_clock_getres) ||
52 ($i eq 'clock_gettime' && !&d_clock_gettime) ||
53 ($i eq 'clock_nanosleep' && !&d_clock_nanosleep) ||
54 ($i eq 'clock' && !&d_clock) ||
55 ($i eq 'nanosleep' && !&d_nanosleep) ||
56 ($i eq 'usleep' && !&d_usleep) ||
57 ($i eq 'ualarm' && !&d_ualarm)) {
58 require Carp;
59 Carp::croak("Time::HiRes::$i(): unimplemented in this platform");
60 }
61 }
62220µs257µs Time::HiRes->export_to_level(1, $this, @_);
# spent 57µs making 2 calls to Exporter::export_to_level, avg 28µs/call
63}
64
6519µs1380µsbootstrap Time::HiRes;
# spent 380µs making 1 call to DynaLoader::bootstrap
66
67# Preloaded methods go here.
68
69
# spent 20µs (16+3) within Time::HiRes::tv_interval which was called: # once (16µs+3µs) by Hailo::Command::train_progress at line 340 of lib/Hailo/Command.pm
sub tv_interval {
70 # probably could have been done in C
7112µs my ($a, $b) = @_;
72110µs14µs $b = [gettimeofday()] unless defined($b);
# spent 4µs making 1 call to Time::HiRes::gettimeofday
7319µs (${$b}[0] - ${$a}[0]) + ((${$b}[1] - ${$a}[1]) / 1_000_000);
74}
75
76# Autoload methods go after =cut, and are processed by the autosplit program.
77
7818µs1;
79__END__
 
# spent 52µs within Time::HiRes::bootstrap which was called: # once (52µs+0s) by DynaLoader::bootstrap at line 219 of DynaLoader.pm
sub Time::HiRes::bootstrap; # xsub
# spent 10µs within Time::HiRes::gettimeofday which was called 2 times, avg 5µs/call: # once (6µs+0s) by Hailo::Command::train_progress at line 329 of lib/Hailo/Command.pm # once (4µs+0s) by Time::HiRes::tv_interval at line 72
sub Time::HiRes::gettimeofday; # xsub
# spent 68.4ms within Time::HiRes::time which was called 25001 times, avg 3µs/call: # 25000 times (68.4ms+0s) by Term::Sk::show_maybe at line 161 of Term/Sk.pm, avg 3µs/call # once (14µs+0s) by Term::Sk::new at line 112 of Term/Sk.pm
sub Time::HiRes::time; # xsub