← 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:23:38 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/LockFile/Lock.pm
StatementsExecuted 4 statements in 148µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs14µsLockFile::Lock::Simple::::BEGIN@16LockFile::Lock::Simple::BEGIN@16
0000s0sLockFile::Lock::::_lock_init LockFile::Lock::_lock_init
0000s0sLockFile::Lock::::filename LockFile::Lock::filename
0000s0sLockFile::Lock::::line LockFile::Lock::line
0000s0sLockFile::Lock::::release LockFile::Lock::release
0000s0sLockFile::Lock::::scheme LockFile::Lock::scheme
0000s0sLockFile::Lock::::where LockFile::Lock::where
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1;# $Id
2;#
3;# @COPYRIGHT@
4;#
5;# $Log: Lock.pm,v $
6;# Revision 0.3 2007/09/28 19:20:14 jv
7;# Track where lock was issued in the code.
8;#
9;# Revision 0.2.1.1 2000/01/04 21:16:28 ram
10;# patch1: track where lock was issued in the code
11;#
12;# Revision 0.2 1999/12/07 20:51:04 ram
13;# Baseline for 0.2 release.
14;#
15
163145µs216µs
# spent 14µs (12+2) within LockFile::Lock::Simple::BEGIN@16 which was called: # once (12µs+2µs) by Tapper::Base::BEGIN@12 at line 16
use strict;
# spent 14µs making 1 call to LockFile::Lock::Simple::BEGIN@16 # spent 2µs making 1 call to strict::import
17
18########################################################################
19package LockFile::Lock;
20
21#
22# A lock instance -- deferred class.
23#
24
25#
26# ->_lock_init
27#
28# Common lock initialization
29#
30# Attributes:
31#
32# scheme the LockFile::* object that created the lock
33# filename where lock was taken
34# line line in filename where lock was taken
35#
36sub _lock_init {
37 my $self = shift;
38 my ($scheme, $filename, $line) = @_;
39 $self->{'scheme'} = $scheme;
40 $self->{'filename'} = $filename;
41 $self->{'line'} = $line;
42}
43
44#
45# Common attribute access
46#
47
48sub scheme { $_[0]->{'scheme'} }
49sub filename { $_[0]->{'filename'} }
50sub line { $_[0]->{'line'} }
51
52#
53# ->release
54#
55# Release the lock
56#
57sub release {
58 my $self = shift;
59 return $self->scheme->release($self);
60}
61
62#
63# ->where
64#
65# Returns '"filename", line #' where lock was taken.
66#
67sub where {
68 my $self = shift;
69 return sprintf '"%s", line %d', $self->filename, $self->line;
70}
71
7212µs1;
73