line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Benchmark; |
2
|
1
|
|
|
1
|
|
338
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
4
|
1
|
|
|
1
|
|
653
|
use Test::More; |
|
1
|
|
|
|
|
14360
|
|
|
1
|
|
|
|
|
6
|
|
5
|
1
|
|
|
1
|
|
771
|
use Benchmark qw(cmpthese timethese :hireswallclock); |
|
1
|
|
|
|
|
5819
|
|
|
1
|
|
|
|
|
5
|
|
6
|
1
|
|
|
1
|
|
609
|
use Capture::Tiny qw(capture); |
|
1
|
|
|
|
|
22200
|
|
|
1
|
|
|
|
|
84
|
|
7
|
1
|
|
|
1
|
|
9
|
use Exporter qw(import); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
125
|
|
8
|
|
|
|
|
|
|
our $VERSION = '1.21'; |
9
|
|
|
|
|
|
|
our @EXPORT = qw(benchmark_diag); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub benchmark_diag { |
12
|
1
|
|
|
1
|
1
|
14
|
my ($iterations, $benchmark_hash) = @_; |
13
|
|
|
|
|
|
|
my $stdout = capture { |
14
|
1
|
|
|
1
|
|
1309
|
cmpthese(timethese($iterations, $benchmark_hash)); |
15
|
1
|
|
|
|
|
35
|
}; |
16
|
1
|
|
|
|
|
94113216
|
diag $stdout; |
17
|
1
|
|
|
|
|
157
|
plan tests => 1; |
18
|
1
|
|
|
|
|
93
|
pass('benchmark'); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
__END__ |