]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Use user time instead of wall-clock time.
authorNicholas Nethercote <njn@valgrind.org>
Tue, 13 Dec 2005 20:23:38 +0000 (20:23 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Tue, 13 Dec 2005 20:23:38 +0000 (20:23 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5332

perf/vg_perf.in

index e0719eefea50f149f24e804accd0dcee94238fd7..d19822cc58dc03eb491ea188ad970d3cff8e1d29 100644 (file)
@@ -225,7 +225,7 @@ sub mysystem($)
     }
 }
 
-# Run program N times, return the best wall-clock time.
+# Run program N times, return the best user time.
 sub time_prog($$)
 {
     my ($cmd, $n) = @_;
@@ -234,11 +234,11 @@ sub time_prog($$)
         mysystem("echo '$cmd' > perf.cmd");
         my $retval = mysystem("$cmd > perf.stdout 2> perf.stderr");
         (0 == $retval) or 
-            die "\n*** Command returned non-zero:  $cmd\n"
+            die "\n*** Command returned non-zero:  $cmd"
               . "\n*** See perf.{cmd,stdout,stderr} to diagnose what went wrong.\n";
         my $out = `cat perf.stderr`;
-        ($out =~ /walltime: ([\d\.]+)s/) or 
-            die "\n*** missing walltime in perf.stderr\n";
+        ($out =~ /usertime: ([\d\.]+)s/) or 
+            die "\n*** missing usertime in perf.stderr\n";
         $tmin = $1 if ($1 < $tmin);
     }
     return $tmin;
@@ -261,7 +261,7 @@ sub do_one_test($$)
 
     printf("%-12s", "$name:");
 
-    my $timecmd = "/usr/bin/time -f 'walltime: %es'";
+    my $timecmd = "/usr/bin/time -f 'usertime: %Us'";
 
     # Do the native run(s).
     printf("nt:");