« blib/lib/Benchmark/Perl/Formance/Plugin/Rx.pm
↑ Summary
blib/lib/Benchmark/Perl/Formance/Plugin/Fib.pm »
| 1 | package Benchmark::Perl::Formance::Plugin::Incubator; | ||
| 2 | 1 | our $AUTHORITY = 'cpan:SCHWIGON'; | |
| 3 | # ABSTRACT: benchmark plugin - Incubator - everchanging benchmark experiments | ||
| 4 | |||
| 5 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | our $VERSION = "0.002"; | |
| 9 | |||
| 10 | ############################################################# | ||
| 11 | # # | ||
| 12 | # Benchmark Code ahead - Don't touch without strong reason! # | ||
| 13 | # # | ||
| 14 | ############################################################# | ||
| 15 | |||
| 16 | 1 | ▶ | use Benchmark ':hireswallclock'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | sub incubator | ||
| 19 | 0 | ▶ | { |
|
Subroutine
incubator: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 20 | 0 | my ($options) = @_; | |
| 21 | |||
| 22 | 0 | my $count = 1; | |
| 23 | |||
| 24 | 0 | ▶ | my $t = timeit $count, sub { sleep 2 }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 25 | return { | ||
| 26 | 0 | Benchmark => $t, | |
| 27 | goal => $count, | ||
| 28 | }; | ||
| 29 | } | ||
| 30 | |||
| 31 | sub main | ||
| 32 | 0 | ▶ | { |
|
Subroutine
main: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 33 | 0 | my ($options) = @_; | |
| 34 | |||
| 35 | return { | ||
| 36 | 0 | incubator => incubator ($options), | |
| 37 | }; | ||
| 38 | } | ||
| 39 | |||
| 40 | 1 | 1; | |
| 41 | |||
| 42 | __END__ | ||