Re: Storable 2.04 'make test' failure on AIX, perl 5.005_03
[p5sagit/p5-mst-13.2.git] / lib / Benchmark.t
index a12ae6e..d7533c3 100644 (file)
@@ -12,7 +12,7 @@ use Test::More tests => 159;
 
 use Benchmark qw(:all);
 
-my $delta = 0.3;
+my $delta = 0.4;
 
 # Some timing ballast
 sub fib {
@@ -69,9 +69,13 @@ my $in_onesec = $onesec->iters;
 print "# $in_onesec iterations\n";
 ok ($in_onesec > 0, "iters returned positive iterations");
 
-my $difference = $in_onesec - $estimate;
-ok (abs ($difference / $in_onesec) < $delta,
-    "is $in_onesec within $delta of estimate ($estimate)");
+{
+  my $difference = $in_onesec - $estimate;
+  my $actual = abs ($difference / $in_onesec);
+  ok ($actual < $delta, "is $in_onesec within $delta of estimate ($estimate)");
+  print "# $in_onesec is between " . ($delta / 2) .
+    " and $delta of estimate. Not that safe.\n" if $actual > $delta/2;
+}
 
 # I found that the eval'ed version was 3 times faster than the coderef.
 # (now it has a different ballast value)