|
From: <sv...@va...> - 2005-12-13 20:23:40
|
Author: njn
Date: 2005-12-13 20:23:38 +0000 (Tue, 13 Dec 2005)
New Revision: 5332
Log:
Use user time instead of wall-clock time.
Modified:
trunk/perf/vg_perf.in
Modified: trunk/perf/vg_perf.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/perf/vg_perf.in 2005-12-13 20:05:00 UTC (rev 5331)
+++ trunk/perf/vg_perf.in 2005-12-13 20:23:38 UTC (rev 5332)
@@ -225,7 +225,7 @@
}
}
=20
-# 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) =3D @_;
@@ -234,11 +234,11 @@
mysystem("echo '$cmd' > perf.cmd");
my $retval =3D mysystem("$cmd > perf.stdout 2> perf.stderr");
(0 =3D=3D $retval) or=20
- die "\n*** Command returned non-zero: $cmd\n"
+ die "\n*** Command returned non-zero: $cmd"
. "\n*** See perf.{cmd,stdout,stderr} to diagnose what wen=
t wrong.\n";
my $out =3D `cat perf.stderr`;
- ($out =3D~ /walltime: ([\d\.]+)s/) or=20
- die "\n*** missing walltime in perf.stderr\n";
+ ($out =3D~ /usertime: ([\d\.]+)s/) or=20
+ die "\n*** missing usertime in perf.stderr\n";
$tmin =3D $1 if ($1 < $tmin);
}
return $tmin;
@@ -261,7 +261,7 @@
=20
printf("%-12s", "$name:");
=20
- my $timecmd =3D "/usr/bin/time -f 'walltime: %es'";
+ my $timecmd =3D "/usr/bin/time -f 'usertime: %Us'";
=20
# Do the native run(s).
printf("nt:");
|