← Index
NYTProf Performance Profile   « line view »
For /usr/local/bin/sa-learn
  Run on Sun Nov 5 03:09:29 2017
Reported on Mon Nov 6 13:20:48 2017

Filename/usr/local/lib/perl5/site_perl/Mail/SpamAssassin/Locker.pm
StatementsExecuted 181799 statements in 94525s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
90888114.32s94524sMail::SpamAssassin::Locker::::jittery_one_second_sleepMail::SpamAssassin::Locker::jittery_one_second_sleep
11142µs49µsMail::SpamAssassin::Locker::::BEGIN@20Mail::SpamAssassin::Locker::BEGIN@20
11128µs1.39msMail::SpamAssassin::Locker::::BEGIN@24Mail::SpamAssassin::Locker::BEGIN@24
11120µs98µsMail::SpamAssassin::Locker::::BEGIN@29Mail::SpamAssassin::Locker::BEGIN@29
11119µs40µsMail::SpamAssassin::Locker::::BEGIN@21Mail::SpamAssassin::Locker::BEGIN@21
11119µs24µsMail::SpamAssassin::Locker::::BEGIN@22Mail::SpamAssassin::Locker::BEGIN@22
11118µs66µsMail::SpamAssassin::Locker::::BEGIN@23Mail::SpamAssassin::Locker::BEGIN@23
11114µs14µsMail::SpamAssassin::Locker::::newMail::SpamAssassin::Locker::new
11112µs12µsMail::SpamAssassin::Locker::::BEGIN@27Mail::SpamAssassin::Locker::BEGIN@27
11112µs12µsMail::SpamAssassin::Locker::::BEGIN@25Mail::SpamAssassin::Locker::BEGIN@25
0000s0sMail::SpamAssassin::Locker::::refresh_lockMail::SpamAssassin::Locker::refresh_lock
0000s0sMail::SpamAssassin::Locker::::safe_lockMail::SpamAssassin::Locker::safe_lock
0000s0sMail::SpamAssassin::Locker::::safe_unlockMail::SpamAssassin::Locker::safe_unlock
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# <@LICENSE>
2# Licensed to the Apache Software Foundation (ASF) under one or more
3# contributor license agreements. See the NOTICE file distributed with
4# this work for additional information regarding copyright ownership.
5# The ASF licenses this file to you under the Apache License, Version 2.0
6# (the "License"); you may not use this file except in compliance with
7# the License. You may obtain a copy of the License at:
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# </@LICENSE>
17
18package Mail::SpamAssassin::Locker;
19
20251µs256µs
# spent 49µs (42+7) within Mail::SpamAssassin::Locker::BEGIN@20 which was called: # once (42µs+7µs) by Mail::SpamAssassin::Locker::UnixNFSSafe::BEGIN@26 at line 20
use strict;
# spent 49µs making 1 call to Mail::SpamAssassin::Locker::BEGIN@20 # spent 7µs making 1 call to strict::import
21250µs261µs
# spent 40µs (19+21) within Mail::SpamAssassin::Locker::BEGIN@21 which was called: # once (19µs+21µs) by Mail::SpamAssassin::Locker::UnixNFSSafe::BEGIN@26 at line 21
use warnings;
# spent 40µs making 1 call to Mail::SpamAssassin::Locker::BEGIN@21 # spent 21µs making 1 call to warnings::import
22250µs228µs
# spent 24µs (19+5) within Mail::SpamAssassin::Locker::BEGIN@22 which was called: # once (19µs+5µs) by Mail::SpamAssassin::Locker::UnixNFSSafe::BEGIN@26 at line 22
use bytes;
# spent 24µs making 1 call to Mail::SpamAssassin::Locker::BEGIN@22 # spent 5µs making 1 call to bytes::import
23250µs2114µs
# spent 66µs (18+48) within Mail::SpamAssassin::Locker::BEGIN@23 which was called: # once (18µs+48µs) by Mail::SpamAssassin::Locker::UnixNFSSafe::BEGIN@26 at line 23
use re 'taint';
# spent 66µs making 1 call to Mail::SpamAssassin::Locker::BEGIN@23 # spent 48µs making 1 call to re::import
24260µs22.74ms
# spent 1.39ms (28µs+1.36) within Mail::SpamAssassin::Locker::BEGIN@24 which was called: # once (28µs+1.36ms) by Mail::SpamAssassin::Locker::UnixNFSSafe::BEGIN@26 at line 24
use Fcntl;
# spent 1.39ms making 1 call to Mail::SpamAssassin::Locker::BEGIN@24 # spent 1.36ms making 1 call to Exporter::import
25248µs112µs
# spent 12µs within Mail::SpamAssassin::Locker::BEGIN@25 which was called: # once (12µs+0s) by Mail::SpamAssassin::Locker::UnixNFSSafe::BEGIN@26 at line 25
use Time::HiRes ();
# spent 12µs making 1 call to Mail::SpamAssassin::Locker::BEGIN@25
26
27265µs112µs
# spent 12µs within Mail::SpamAssassin::Locker::BEGIN@27 which was called: # once (12µs+0s) by Mail::SpamAssassin::Locker::UnixNFSSafe::BEGIN@26 at line 27
use Mail::SpamAssassin;
# spent 12µs making 1 call to Mail::SpamAssassin::Locker::BEGIN@27
28
2912µs
# spent 98µs (20+78) within Mail::SpamAssassin::Locker::BEGIN@29 which was called: # once (20µs+78µs) by Mail::SpamAssassin::Locker::UnixNFSSafe::BEGIN@26 at line 31
use vars qw{
30 @ISA
311415µs2176µs};
# spent 98µs making 1 call to Mail::SpamAssassin::Locker::BEGIN@29 # spent 78µs making 1 call to vars::import
32
33113µs@ISA = qw();
34
35###########################################################################
36
37
# spent 14µs within Mail::SpamAssassin::Locker::new which was called: # once (14µs+0s) by Mail::SpamAssassin::Locker::UnixNFSSafe::new at line 43 of Mail/SpamAssassin/Locker/UnixNFSSafe.pm
sub new {
3812µs my $class = shift;
3912µs $class = ref($class) || $class;
4012µs my $self = { };
4113µs bless ($self, $class);
42111µs $self;
43}
44
45###########################################################################
46
47sub safe_lock {
48 my ($self, $path, $max_retries, $mode) = @_;
49 # max_retries is optional, should default to about 30
50 # mode is UNIX-style and optional, should default to 0700,
51 # callers must specify --x bits
52 die "locker: safe_lock not implemented by Locker subclass";
53}
54
55###########################################################################
56
57sub safe_unlock {
58 my ($self, $path) = @_;
59 die "locker: safe_unlock not implemented by Locker subclass";
60}
61
62###########################################################################
63
64sub refresh_lock {
65 my ($self, $path) = @_;
66 die "locker: refresh_lock not implemented by Locker subclass";
67}
68
69###########################################################################
70
71
# spent 94524s (4.32+94519) within Mail::SpamAssassin::Locker::jittery_one_second_sleep which was called 90888 times, avg 1.04s/call: # 90888 times (4.32s+94519s) by Mail::SpamAssassin::Locker::UnixNFSSafe::safe_lock at line 87 of Mail/SpamAssassin/Locker/UnixNFSSafe.pm, avg 1.04s/call
sub jittery_one_second_sleep {
7290888293ms my ($self) = @_;
739088894524s9088894519s Time::HiRes::sleep(rand(1.0) + 0.5);
# spent 94519s making 90888 calls to Time::HiRes::sleep, avg 1.04s/call
74}
75
76###########################################################################
77
78111µs1;