line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Benchmark; |
2
|
1
|
|
|
1
|
|
347
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
616
|
use Test::More; |
|
1
|
|
|
|
|
14829
|
|
|
1
|
|
|
|
|
8
|
|
5
|
1
|
|
|
1
|
|
898
|
use Benchmark qw(cmpthese timethese :hireswallclock); |
|
1
|
|
|
|
|
5729
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
678
|
use Capture::Tiny qw(capture); |
|
1
|
|
|
|
|
24312
|
|
|
1
|
|
|
|
|
96
|
|
7
|
1
|
|
|
1
|
|
10
|
use Exporter qw(import); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
142
|
|
8
|
|
|
|
|
|
|
our $VERSION = '2.00'; |
9
|
|
|
|
|
|
|
our @EXPORT = qw(benchmark_diag); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub benchmark_diag { |
12
|
1
|
|
|
1
|
1
|
20
|
my ($iterations, $benchmark_hash) = @_; |
13
|
|
|
|
|
|
|
my $stdout = capture { |
14
|
1
|
|
|
1
|
|
1488
|
cmpthese(timethese($iterations, $benchmark_hash)); |
15
|
1
|
|
|
|
|
56
|
}; |
16
|
1
|
|
|
|
|
101139815
|
diag $stdout; |
17
|
1
|
|
|
|
|
266
|
plan tests => 1; |
18
|
1
|
|
|
|
|
508
|
pass('benchmark'); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
__END__ |