Profile of Time/HiRes.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For xt/tapper-mcp-scheduler-with-db-longrun.t
Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:22:35 2012

Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3/x86_64-linux/Time/HiRes.pm
Statements | Executed 23 statements in 461µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 49µs | 49µs | Time::HiRes::::bootstrapTime::HiRes::bootstrap (xsub)
3 | 2 | 2 | 28µs | 28µs | Time::HiRes::::gettimeofdayTime::HiRes::gettimeofday (xsub)
1 | 1 | 1 | 18µs | 210µs | Time::HiRes::::importTime::HiRes::import
1 | 1 | 1 | 11µs | 13µs | Time::HiRes::::BEGIN@3Time::HiRes::BEGIN@3
1 | 1 | 1 | 11µs | 24µs | Time::HiRes::::BEGIN@42Time::HiRes::BEGIN@42
1 | 1 | 1 | 7µs | 82µs | Time::HiRes::::BEGIN@4Time::HiRes::BEGIN@4
0 | 0 | 0 | 0s | 0s | Time::HiRes::::AUTOLOADTime::HiRes::AUTOLOAD
0 | 0 | 0 | 0s | 0s | Time::HiRes::::__ANON__[:43]Time::HiRes::__ANON__[:43]
0 | 0 | 0 | 0s | 0s | Time::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
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package Time::HiRes;
2 |  |  |  |  |
3 | 3 | 21µs | 2 | 15µs | # spent 13µs (11+2) within Time::HiRes::BEGIN@3 which was called: # once (11µs+2µs) by Log::Log4perl::Util::module_available at line 3 use strict; # spent 13µs making 1 call to Time::HiRes::BEGIN@3 # spent 2µs making 1 call to strict::import
4 | 3 | 152µs | 2 | 156µs | # spent 82µs (7+74) within Time::HiRes::BEGIN@4 which was called: # once (7µs+74µs) by Log::Log4perl::Util::module_available at line 4 use vars qw($VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); # spent 82µs making 1 call to Time::HiRes::BEGIN@4 # spent 74µs making 1 call to vars::import
5 |  |  |  |  |
6 | 1 | 600ns |  |  | require Exporter;
7 | 1 | 600ns |  |  | require DynaLoader;
8 |  |  |  |  |
9 | 1 | 17µs |  |  | @ISA = qw(Exporter DynaLoader);
10 |  |  |  |  |
11 | 1 | 300ns |  |  | @EXPORT = qw( );
12 | 1 | 9µ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 |  |  |  |  |
26 | 1 | 300ns |  |  | $VERSION = '1.9719';
27 | 1 | 300ns |  |  | $XS_VERSION = $VERSION;
28 | 1 | 11µs |  |  | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval
29 |  |  |  |  |
30 |  |  |  |  | sub 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 |  |  |  |  | {
42 | 3 | 219µs | 2 | 37µs | # spent 24µs (11+13) within Time::HiRes::BEGIN@42 which was called: # once (11µs+13µs) by Log::Log4perl::Util::module_available at line 42 no strict 'refs'; # spent 24µs making 1 call to Time::HiRes::BEGIN@42 # spent 13µs making 1 call to strict::unimport
43 |  |  |  |  | *$AUTOLOAD = sub { $val };
44 |  |  |  |  | }
45 |  |  |  |  | goto &$AUTOLOAD;
46 |  |  |  |  | }
47 |  |  |  |  |
48 |  |  |  |  | # spent 210µs (18+191) within Time::HiRes::import which was called: # once (18µs+191µs) by DBIx::Class::Schema::Versioned::BEGIN@205 at line 205 of DBIx/Class/Schema/Versioned.pm sub import {
49 | 4 | 14µs |  |  | my $this = shift;
50 |  |  |  |  | for my $i (@_) {
51 |  |  |  |  | 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 |  |  |  |  | }
62 |  |  | 1 | 24µs | Time::HiRes->export_to_level(1, $this, @_); # spent 24µs making 1 call to Exporter::export_to_level
63 |  |  |  |  | }
64 |  |  |  |  |
65 | 1 | 6µs | 1 | 310µs | bootstrap Time::HiRes; # spent 310µs making 1 call to DynaLoader::bootstrap
66 |  |  |  |  |
67 |  |  |  |  | # Preloaded methods go here.
68 |  |  |  |  |
69 |  |  |  |  | sub tv_interval {
70 |  |  |  |  | # probably could have been done in C
71 |  |  |  |  | my ($a, $b) = @_;
72 |  |  |  |  | $b = [gettimeofday()] unless defined($b);
73 |  |  |  |  | (${$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 |  |  |  |  |
78 | 1 | 9µs |  |  | 1;
79 |  |  |  |  | __END__
|  |  |  |  | # spent 49µs within Time::HiRes::bootstrap which was called: # once (49µs+0s) by DynaLoader::bootstrap at line 223 of DynaLoader.pm sub Time::HiRes::bootstrap; # xsub
|  |  |  |  | # spent 28µs within Time::HiRes::gettimeofday which was called 3 times, avg 9µs/call: # 2 times (15µs+0s) by DBIx::Class::Schema::Versioned::_set_db_version at line 711 of DBIx/Class/Schema/Versioned.pm, avg 7µs/call # once (13µs+0s) by Log::Log4perl::Util::TimeTracker::_gettimeofday at line 55 of Log/Log4perl/Util/TimeTracker.pm sub Time::HiRes::gettimeofday; # xsub