This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
File::CheckTree hates @'s
[perl5.git] / lib / Benchmark.t
index dddce3d..53d4efc 100644 (file)
@@ -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 {
@@ -318,7 +319,7 @@ sub check_graph {
 {
     select(OUT);
     my $start = times;
-    my $chart = cmpthese( -0.1, { a => "++\$i", b => "\$i *= 2" } ) ;
+    my $chart = cmpthese( -0.1, { a => "++\$i", b => "\$i = sqrt(\$i++)" } ) ;
     my $end = times;
     select(STDOUT);
     ok (($end - $start) > 0.05, "benchmarked code ran for over 0.05 seconds");