X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FBenchmark.t;h=503463329e82c67dc3f09acb6f15f426c7c42f70;hb=0bd43963443f227c8bd1734af34fc6e6a7d2d54e;hp=25a3478c1bc1347022c224a6c9f386d75a4ed2f1;hpb=6793f7e0c97a513d6d275a6fee0899d359159b30;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Benchmark.t b/lib/Benchmark.t index 25a3478..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,7 +280,8 @@ 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"); + "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 {