Benchmark-MCE
view release on metacpan or search on metacpan
lib/Benchmark/MCE.pm view on Meta::CPAN
$dist +=
great_circle_distance(rand(pi), rand(2 * pi), rand(pi), rand(2 * pi))
for 1 .. $size;
return $dist; # Returning a value is optional for the Pass/Fail functionality
}
my %stats = suite_run({
bench => { 'Math::Trig' => # A unique name for the benchmark
[
\&great_circle, # Reference to bench function
'3144042.81433949', # Reference output - determines Pass/Fail (optional)
5.5, # Seconds to complete in normal mode for score = 1000 (optional)
1000000, # Argument to pass for quick mode (optional)
5000000 # Argument to pass for normal mode (optional)
]},
}
);
=head1 STDOUT / QUIET MODE
Normally function calls will print results to C<STDOUT> as well as return them.
( run in 0.595 second using v1.01-cache-2.11-cpan-39bf76dae61 )