X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FBenchmark.t;h=503463329e82c67dc3f09acb6f15f426c7c42f70;hb=0bd43963443f227c8bd1734af34fc6e6a7d2d54e;hp=2b5e1b4fb3a66951a43f28f57e60cf48038b22a7;hpb=0e74ff8eba19578bfa1e14070fb7ec32d9ff504c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Benchmark.t b/lib/Benchmark.t index 2b5e1b4..5034633 100644 --- a/lib/Benchmark.t +++ b/lib/Benchmark.t @@ -12,7 +12,7 @@ use Test::More tests => 159; use Benchmark qw(:all); -my $delta = 0.2; +my $delta = 0.3; # Some timing ballast sub fib { @@ -59,7 +59,7 @@ my $in_threesecs = $threesecs->iters; print "# $in_threesecs iterations\n"; ok ($in_threesecs > 0, "iters returned positive iterations"); -my $estimate = int ($in_threesecs / 3); +my $estimate = int (100 * $in_threesecs / 3) / 100; print "# from the 3 second run estimate $estimate iterations in 1 second...\n"; $baz = 0; my $onesec = countit(1, $coderef); @@ -280,8 +280,10 @@ sub check_graph_consistency { if ($slowrate < $fastrate) { pass ("slow rate is less than fast rate"); ok ($slowfast < 0 && $slowfast > -100, - "slowfast should be less than zero, and > -100"); - ok ($fastslow > 100, "fastslow should be > 100"); + "slowfast should be less than zero, and > -100") || + print STDERR "# slowfast $slowfast\n"; + ok ($fastslow > 0, "fastslow should be > 0") || + print STDERR "# fastslow $fastslow\n"; } else { is ($slowrate, $fastrate, "slow rate isn't less than fast rate, so should be the same");