line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Aspect::Library::Profiler; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
935
|
use 5.008002; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
46
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
5
|
1
|
|
|
1
|
|
15
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
6
|
1
|
|
|
1
|
|
924
|
use Benchmark::Timer 0.7101 (); |
|
1
|
|
|
|
|
12353
|
|
|
1
|
|
|
|
|
26
|
|
7
|
1
|
|
|
1
|
|
841
|
use Aspect::Modular 1.00 (); |
|
1
|
|
|
|
|
5840
|
|
|
1
|
|
|
|
|
25
|
|
8
|
1
|
|
|
1
|
|
877
|
use Aspect::Advice::Around (); |
|
1
|
|
|
|
|
8670
|
|
|
1
|
|
|
|
|
25
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
7
|
use vars qw{$VERSION @ISA}; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
78
|
|
11
|
|
|
|
|
|
|
BEGIN { |
12
|
1
|
|
|
1
|
|
3
|
$VERSION = '1.00'; |
13
|
1
|
|
|
|
|
177
|
@ISA = 'Aspect::Modular'; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $TIMER = Benchmark::Timer->new; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
END { |
19
|
|
|
|
|
|
|
print scalar $TIMER->reports; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub get_advice { |
23
|
|
|
|
|
|
|
Aspect::Advice::Around->new( |
24
|
|
|
|
|
|
|
lexical => $_[0]->lexical, |
25
|
|
|
|
|
|
|
pointcut => $_[1], |
26
|
|
|
|
|
|
|
code => sub { |
27
|
0
|
|
|
0
|
|
|
my $name = $_->sub_name; |
28
|
0
|
|
|
|
|
|
$TIMER->start($name); |
29
|
0
|
|
|
|
|
|
$_->proceed; |
30
|
0
|
|
|
|
|
|
$TIMER->stop($name); |
31
|
|
|
|
|
|
|
}, |
32
|
0
|
|
|
0
|
0
|
|
); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |