Benchmark-Confirm
view release on metacpan or search on metacpan
lib/Benchmark/Confirm.pm view on Meta::CPAN
for example, it is ordinary to execute benchmark script...
perl some_benchmark.pl
and use Benchmark::Confirm
perl -MBenchmark::Confirm some_benchmark.pl
then you get the result of benchmark and the confirmination.
Benchmark: timing 1 iterations of Name1, Name2, Name3...
Name1: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
(warning: too few iterations for a reliable count)
Name2: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
(warning: too few iterations for a reliable count)
Name3: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
(warning: too few iterations for a reliable count)
Rate Name3 Name1 Name2
Name3 10000/s -- 0% 0%
Name1 10000/s 0% -- 0%
Name2 10000/s 0% 0% --
ok 1
ok 2
ok 3
1..3
See the last 4 lines, these are the result of confirmation.
lib/Benchmark/Confirm.pm view on Meta::CPAN
=head1 IMPORT OPTIONS
=head2 TAP
If you want to get valid TAP result, you should add import option C<TAP>.
perl -MBenchmark::Confirm=TAP some_benchmark.pl
Then you get results as valid TAP like below.
# Benchmark: timing 1 iterations of Name1, Name2, Name3...
# Name1: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
# (warning: too few iterations for a reliable count)
# Name2: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
# (warning: too few iterations for a reliable count)
# Name3: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
# (warning: too few iterations for a reliable count)
# Rate Name3 Name1 Name2
# Name3 10000/s -- 0% 0%
# Name1 10000/s 0% -- 0%
# Name2 10000/s 0% 0% --
ok 1
ok 2
ok 3
1..3
=head2 no_plan
( run in 3.277 seconds using v1.01-cache-2.11-cpan-96521ef73a4 )