Filename | /usr/local/lib/perl5/5.24/mach/Time/HiRes.pm |
Statements | Executed 62 statements in 2.00ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
8 | 1 | 1 | 8.80s | 8.80s | sleep (xsub) | Time::HiRes::
5112 | 6 | 4 | 30.3ms | 30.3ms | time (xsub) | Time::HiRes::
9 | 9 | 9 | 370µs | 3.75ms | import | Time::HiRes::
1 | 1 | 1 | 78µs | 78µs | bootstrap (xsub) | Time::HiRes::
1 | 1 | 1 | 66µs | 66µs | BEGIN@3 | Time::HiRes::
1 | 1 | 1 | 59µs | 87µs | AUTOLOAD | Time::HiRes::
1 | 1 | 1 | 28µs | 80µs | BEGIN@48 | Time::HiRes::
1 | 1 | 1 | 25µs | 36µs | BEGIN@4 | Time::HiRes::
1 | 1 | 1 | 21µs | 21µs | constant (xsub) | Time::HiRes::
1 | 1 | 1 | 11µs | 11µs | clock_getres (xsub) | Time::HiRes::
1 | 1 | 1 | 11µs | 11µs | __ANON__[:49] | Time::HiRes::
1 | 1 | 1 | 7µs | 7µs | CORE:subst (opcode) | Time::HiRes::
0 | 0 | 0 | 0s | 0s | tv_interval | Time::HiRes::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Time::HiRes; | ||||
2 | |||||
3 | 2 | 115µs | 1 | 66µs | # spent 66µs within Time::HiRes::BEGIN@3 which was called:
# once (66µs+0s) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 3 # spent 66µs making 1 call to Time::HiRes::BEGIN@3 |
4 | 3 | 452µs | 2 | 48µs | # spent 36µs (25+12) within Time::HiRes::BEGIN@4 which was called:
# once (25µs+12µs) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 4 # spent 36µs making 1 call to Time::HiRes::BEGIN@4
# spent 12µs making 1 call to strict::import |
5 | |||||
6 | 1 | 5µs | require Exporter; | ||
7 | 1 | 283µs | require DynaLoader; | ||
8 | |||||
9 | 1 | 25µs | our @ISA = qw(Exporter DynaLoader); | ||
10 | |||||
11 | 1 | 2µs | our @EXPORT = qw( ); | ||
12 | 1 | 15µs | our @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 | |||||
31 | 1 | 2µs | our $VERSION = '1.9741'; | ||
32 | 1 | 2µs | our $XS_VERSION = $VERSION; | ||
33 | 1 | 39µs | $VERSION = eval $VERSION; # spent 5µs executing statements in string eval | ||
34 | |||||
35 | our $AUTOLOAD; | ||||
36 | # spent 87µs (59+28) within Time::HiRes::AUTOLOAD which was called:
# once (59µs+28µs) by Mail::SpamAssassin::AsyncLoop::BEGIN@49 at line 52 of Mail/SpamAssassin/AsyncLoop.pm | ||||
37 | 1 | 2µs | my $constname; | ||
38 | 1 | 20µs | 1 | 7µs | ($constname = $AUTOLOAD) =~ s/.*:://; # spent 7µs making 1 call to Time::HiRes::CORE:subst |
39 | # print "AUTOLOAD: constname = $constname ($AUTOLOAD)\n"; | ||||
40 | 1 | 3µs | die "&Time::HiRes::constant not defined" if $constname eq 'constant'; | ||
41 | 1 | 35µs | 1 | 21µs | my ($error, $val) = constant($constname); # spent 21µs making 1 call to Time::HiRes::constant |
42 | # print "AUTOLOAD: error = $error, val = $val\n"; | ||||
43 | 1 | 2µs | if ($error) { | ||
44 | my (undef,$file,$line) = caller; | ||||
45 | die "$error at $file line $line.\n"; | ||||
46 | } | ||||
47 | { | ||||
48 | 3 | 602µs | 2 | 134µs | # spent 80µs (28+53) within Time::HiRes::BEGIN@48 which was called:
# once (28µs+53µs) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 48 # spent 80µs making 1 call to Time::HiRes::BEGIN@48
# spent 53µs making 1 call to strict::unimport |
49 | 2 | 20µs | # spent 11µs within Time::HiRes::__ANON__[/usr/local/lib/perl5/5.24/mach/Time/HiRes.pm:49] which was called:
# once (11µs+0s) by Mail::SpamAssassin::AsyncLoop::BEGIN@49 at line 51 | ||
50 | } | ||||
51 | 1 | 20µs | 1 | 11µs | goto &$AUTOLOAD; # spent 11µs making 1 call to Time::HiRes::__ANON__[Time/HiRes.pm:49] |
52 | } | ||||
53 | |||||
54 | # spent 3.75ms (370µs+3.38) within Time::HiRes::import which was called 9 times, avg 416µs/call:
# once (48µs+846µs) by Mail::SpamAssassin::NetSet::BEGIN@25 at line 25 of Mail/SpamAssassin/NetSet.pm
# once (42µs+339µs) by Mail::SpamAssassin::Plugin::Check::BEGIN@21 at line 21 of Mail/SpamAssassin/Plugin/Check.pm
# once (44µs+331µs) by Mail::SpamAssassin::PerMsgStatus::BEGIN@57 at line 57 of Mail/SpamAssassin/PerMsgStatus.pm
# once (40µs+333µs) by Mail::SpamAssassin::DnsResolver::BEGIN@52 at line 52 of Mail/SpamAssassin/DnsResolver.pm
# once (34µs+337µs) by Mail::SpamAssassin::AsyncLoop::BEGIN@41 at line 41 of Mail/SpamAssassin/AsyncLoop.pm
# once (41µs+307µs) by Mail::SpamAssassin::BEGIN@86 at line 86 of Mail/SpamAssassin.pm
# once (40µs+301µs) by Mail::SpamAssassin::Util::Progress::BEGIN@50 at line 50 of Mail/SpamAssassin/Util/Progress.pm
# once (41µs+299µs) by Razor2::Logger::BEGIN@7 at line 7 of Razor2/Logger.pm
# once (38µs+285µs) by Mail::SpamAssassin::Timeout::BEGIN@61 at line 61 of Mail/SpamAssassin/Timeout.pm | ||||
55 | 9 | 25µs | my $this = shift; | ||
56 | 9 | 39µs | for my $i (@_) { | ||
57 | 9 | 78µs | 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 | 9 | 161µs | 9 | 600µs | Time::HiRes->export_to_level(1, $this, @_); # spent 600µs making 9 calls to Exporter::export_to_level, avg 67µs/call |
70 | } | ||||
71 | |||||
72 | 1 | 17µs | 1 | 749µs | bootstrap Time::HiRes; # spent 749µs making 1 call to DynaLoader::bootstrap |
73 | |||||
74 | # Preloaded methods go here. | ||||
75 | |||||
76 | sub 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 | |||||
85 | 1 | 34µs | 1; | ||
86 | __END__ | ||||
# spent 7µs within Time::HiRes::CORE:subst which was called:
# once (7µs+0s) by Time::HiRes::AUTOLOAD at line 38 | |||||
# spent 78µs within Time::HiRes::bootstrap which was called:
# once (78µs+0s) by DynaLoader::bootstrap at line 210 of DynaLoader.pm | |||||
# spent 11µs within Time::HiRes::clock_getres which was called:
# once (11µs+0s) by Mail::SpamAssassin::AsyncLoop::BEGIN@49 at line 52 of Mail/SpamAssassin/AsyncLoop.pm | |||||
# spent 21µs within Time::HiRes::constant which was called:
# once (21µs+0s) by Time::HiRes::AUTOLOAD at line 41 | |||||
# spent 8.80s within Time::HiRes::sleep which was called 8 times, avg 1.10s/call:
# 8 times (8.80s+0s) by Mail::SpamAssassin::Locker::jittery_one_second_sleep at line 73 of Mail/SpamAssassin/Locker.pm, avg 1.10s/call | |||||
# spent 30.3ms within Time::HiRes::time which was called 5112 times, avg 6µs/call:
# 1968 times (12.6ms+0s) by Mail::SpamAssassin::AsyncLoop::start_lookup at line 183 of Mail/SpamAssassin/AsyncLoop.pm, avg 6µs/call
# 1968 times (9.21ms+0s) by Mail::SpamAssassin::AsyncLoop::start_lookup at line 222 of Mail/SpamAssassin/AsyncLoop.pm, avg 5µs/call
# 470 times (3.32ms+0s) by Mail::SpamAssassin::PerMsgStatus::is_dns_available at line 489 of Mail/SpamAssassin/Dns.pm, avg 7µs/call
# 470 times (3.21ms+0s) by Mail::SpamAssassin::PerMsgStatus::new at line 284 of Mail/SpamAssassin/PerMsgStatus.pm, avg 7µs/call
# 235 times (1.98ms+0s) by Mail::SpamAssassin::parse at line 528 of Mail/SpamAssassin.pm, avg 8µs/call
# once (4µs+0s) by Mail::SpamAssassin::PerMsgStatus::is_dns_available at line 500 of Mail/SpamAssassin/Dns.pm |