line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
581
|
use 5.008; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
3
|
1
|
|
|
1
|
|
11
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
41
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package App::Benchmark; |
6
|
|
|
|
|
|
|
BEGIN { |
7
|
1
|
|
|
1
|
|
23
|
$App::Benchmark::VERSION = '1.102310'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
# ABSTRACT: Output your benchmarks as test diagnostics |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
1157
|
use Test::More; |
|
1
|
|
|
|
|
26697
|
|
|
1
|
|
|
|
|
10
|
|
12
|
1
|
|
|
1
|
|
1336
|
use Benchmark qw(cmpthese timethese :hireswallclock); |
|
1
|
|
|
|
|
20011
|
|
|
1
|
|
|
|
|
14
|
|
13
|
1
|
|
|
1
|
|
3440
|
use Capture::Tiny qw(capture); |
|
1
|
|
|
|
|
34577
|
|
|
1
|
|
|
|
|
69
|
|
14
|
1
|
|
|
1
|
|
8
|
use Exporter qw(import); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
114
|
|
15
|
|
|
|
|
|
|
our @EXPORT = ('benchmark_diag'); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub benchmark_diag { |
18
|
1
|
|
|
1
|
1
|
18
|
my ($iterations, $benchmark_hash) = @_; |
19
|
|
|
|
|
|
|
my $stdout = capture { |
20
|
1
|
|
|
1
|
|
1381
|
cmpthese(timethese($iterations, $benchmark_hash)); |
21
|
1
|
|
|
|
|
50
|
}; |
22
|
1
|
|
|
|
|
150716577
|
diag $stdout; |
23
|
1
|
|
|
|
|
315
|
plan tests => 1; |
24
|
1
|
|
|
|
|
480
|
pass('benchmark'); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |