summaryrefslogtreecommitdiff
path: root/benchmark-cmd
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-07-29 20:55:20 +0100
committerLars Wirzenius <liw@liw.fi>2011-07-29 20:55:20 +0100
commit3249182b41cf3cdf7e60aaf1d2c71d8e22d12396 (patch)
treebba9a55cbb73c738dd74b820d77bbd89dd5de689 /benchmark-cmd
parent5a24f79659f852b9fd3b30bc097ec072fd1821ba (diff)
downloadextrautils-3249182b41cf3cdf7e60aaf1d2c71d8e22d12396.tar.gz
Report elapsed time as well.
Diffstat (limited to 'benchmark-cmd')
-rwxr-xr-xbenchmark-cmd6
1 files changed, 4 insertions, 2 deletions
diff --git a/benchmark-cmd b/benchmark-cmd
index 3a5ee84..d904602 100755
--- a/benchmark-cmd
+++ b/benchmark-cmd
@@ -89,6 +89,7 @@ class Benchmarker(cliapp.Application):
results.add_column('user', '(s)', '%.1f')
results.add_column('system', '(s)', '%.1f')
results.add_column('max RSS', '(KiB)', '%d')
+ results.add_column('elapsed', '(s)', '%.1f')
results.add_column('cmd', '', '%-0s', left=True)
first = True
@@ -127,7 +128,7 @@ class Benchmarker(cliapp.Application):
fd, timings = tempfile.mkstemp()
time_argv = ['/usr/bin/time',
'-o', timings,
- '--format', '%U\n%S\n%e\n%M',
+ '--format', '%U\n%S\n%e\n%M\n%e',
'--',
'sh',
'-c', cmd]
@@ -152,7 +153,8 @@ class Benchmarker(cliapp.Application):
system = fields[1]
real = fields[2]
maxrss = fields[3]
- return user, system, real, maxrss
+ elapsed = fields[4]
+ return user, system, real, maxrss, elapsed
Benchmarker().run()