← Index
NYTProf Performance Profile   « line view »
For /Users/brian/bin/perls/cpan5.26.1
  Run on Sat Dec 30 01:41:10 2017
Reported on Sat Dec 30 01:44:15 2017

Filename/usr/local/perls/perl-5.26.1/lib/5.26.1/darwin-2level/Time/HiRes.pm
StatementsExecuted 17 statements in 1.63ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111480µs480µsTime::HiRes::::bootstrapTime::HiRes::bootstrap (xsub)
11140µs40µsTime::HiRes::::BEGIN@3Time::HiRes::BEGIN@3
41129µs29µsTime::HiRes::::timeTime::HiRes::time (xsub)
11118µs29µsTime::HiRes::::BEGIN@4Time::HiRes::BEGIN@4
11116µs48µsTime::HiRes::::BEGIN@48Time::HiRes::BEGIN@48
0000s0sTime::HiRes::::AUTOLOADTime::HiRes::AUTOLOAD
0000s0sTime::HiRes::::__ANON__[:49]Time::HiRes::__ANON__[:49]
0000s0sTime::HiRes::::importTime::HiRes::import
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
3299µs140µs
# spent 40µs within Time::HiRes::BEGIN@3 which was called: # once (40µs+0s) by CPAN::has_inst at line 3
{ use 5.006; }
# spent 40µs making 1 call to Time::HiRes::BEGIN@3
43358µs240µs
# spent 29µs (18+11) within Time::HiRes::BEGIN@4 which was called: # once (18µs+11µs) by CPAN::has_inst at line 4
use strict;
# spent 29µs making 1 call to Time::HiRes::BEGIN@4 # spent 11µs making 1 call to strict::import
5
612µsrequire Exporter;
71598µsrequire DynaLoader;
8
9125µsour @ISA = qw(Exporter DynaLoader);
10
1111µsour @EXPORT = qw( );
12113µ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_BOOTTIME CLOCK_HIGHRES
16 CLOCK_MONOTONIC CLOCK_MONOTONIC_COARSE
17 CLOCK_MONOTONIC_PRECISE CLOCK_MONOTONIC_RAW
18 CLOCK_PROCESS_CPUTIME_ID
19 CLOCK_REALTIME CLOCK_REALTIME_COARSE
20 CLOCK_REALTIME_FAST CLOCK_REALTIME_PRECISE
21 CLOCK_SECOND CLOCK_SOFTTIME CLOCK_THREAD_CPUTIME_ID
22 CLOCK_TIMEOFDAY CLOCKS_PER_SEC
23 ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF
24 TIMER_ABSTIME
25 d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
26 d_nanosleep d_clock_gettime d_clock_getres d_hires_utime
27 d_clock d_clock_nanosleep
28 stat lstat utime
29 );
30
3111µsour $VERSION = '1.9741';
3210sour $XS_VERSION = $VERSION;
33148µs$VERSION = eval $VERSION;
# spent 4µs executing statements in string eval
34
35our $AUTOLOAD;
36sub AUTOLOAD {
37 my $constname;
38 ($constname = $AUTOLOAD) =~ s/.*:://;
39 # print "AUTOLOAD: constname = $constname ($AUTOLOAD)\n";
40 die "&Time::HiRes::constant not defined" if $constname eq 'constant';
41 my ($error, $val) = constant($constname);
42 # print "AUTOLOAD: error = $error, val = $val\n";
43 if ($error) {
44 my (undef,$file,$line) = caller;
45 die "$error at $file line $line.\n";
46 }
47 {
482443µs280µs
# spent 48µs (16+32) within Time::HiRes::BEGIN@48 which was called: # once (16µs+32µs) by CPAN::has_inst at line 48
no strict 'refs';
# spent 48µs making 1 call to Time::HiRes::BEGIN@48 # spent 32µs making 1 call to strict::unimport
49 *$AUTOLOAD = sub { $val };
50 }
51 goto &$AUTOLOAD;
52}
53
54sub import {
55 my $this = shift;
56 for my $i (@_) {
57 if (($i eq 'clock_getres' && !&d_clock_getres) ||
58 ($i eq 'clock_gettime' && !&d_clock_gettime) ||
59 ($i eq 'clock_nanosleep' && !&d_clock_nanosleep) ||
60 ($i eq 'clock' && !&d_clock) ||
61 ($i eq 'nanosleep' && !&d_nanosleep) ||
62 ($i eq 'usleep' && !&d_usleep) ||
63 ($i eq 'utime' && !&d_hires_utime) ||
64 ($i eq 'ualarm' && !&d_ualarm)) {
65 require Carp;
66 Carp::croak("Time::HiRes::$i(): unimplemented in this platform");
67 }
68 }
69 Time::HiRes->export_to_level(1, $this, @_);
70}
71
72114µs12.40msbootstrap Time::HiRes;
# spent 2.40ms making 1 call to DynaLoader::bootstrap
73
74# Preloaded methods go here.
75
76sub tv_interval {
77 # probably could have been done in C
78 my ($a, $b) = @_;
79 $b = [gettimeofday()] unless defined($b);
80 (${$b}[0] - ${$a}[0]) + ((${$b}[1] - ${$a}[1]) / 1_000_000);
81}
82
83# Autoload methods go after =cut, and are processed by the autosplit program.
84
85132µs1;
86__END__
 
# spent 480µs within Time::HiRes::bootstrap which was called: # once (480µs+0s) by DynaLoader::bootstrap at line 214 of DynaLoader.pm
sub Time::HiRes::bootstrap; # xsub
# spent 29µs within Time::HiRes::time which was called 4 times, avg 7µs/call: # 4 times (29µs+0s) by CPAN::FTP::_mytime at line 77 of CPAN/FTP.pm, avg 7µs/call
sub Time::HiRes::time; # xsub