line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Evo::Helpers; |
2
|
1
|
|
|
1
|
|
392
|
use Evo '-Export *'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
3
|
|
|
|
|
|
|
|
4
|
0
|
0
|
|
0
|
0
|
|
sub test_memory ($count, $limit, $code) : Export { |
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5
|
0
|
|
|
|
|
|
require Memory::Stats; |
6
|
0
|
|
|
|
|
|
my $stats = Memory::Stats->new; |
7
|
|
|
|
|
|
|
{ |
8
|
0
|
|
|
|
|
|
$stats->start; |
|
0
|
|
|
|
|
|
|
9
|
0
|
|
|
|
|
|
$code->() for 1 .. $count; |
10
|
|
|
|
|
|
|
} |
11
|
0
|
|
|
|
|
|
$stats->stop; |
12
|
0
|
|
|
|
|
|
my $consumed = $stats->usage; |
13
|
0
|
0
|
0
|
|
|
|
die "consumed $consumed bytes, threshold is: $limit" if $limit && $stats->usage > $limit; |
14
|
0
|
|
|
|
|
|
$consumed; |
15
|
1
|
|
|
1
|
|
8
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |