summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbenchmark-reverse.bash8
-rwxr-xr-xtests/canonical-benchmarks.bash7
2 files changed, 12 insertions, 3 deletions
diff --git a/benchmark-reverse.bash b/benchmark-reverse.bash
index 2cb1e94..3e50a62 100755
--- a/benchmark-reverse.bash
+++ b/benchmark-reverse.bash
@@ -35,9 +35,13 @@ trap "rm -f $PLAIN/.gocryptfs.reverse.conf ; fuse-unmount -z $MNT ; rmdir $MNT"
# Mount
gocryptfs -q -reverse -extpass="echo test" $PLAIN $MNT
-# Print elapsed wall time only
+# Execute command, discard all stdout output, print elapsed time
+# (to stderr, unfortunately).
function etime {
- LC_ALL=C /usr/bin/time -f %e 2>&1 $@ > /dev/null
+ # Make the bash builtin "time" print out only the elapse wall clock
+ # seconds
+ TIMEFORMAT=%R
+ time "$@" > /dev/null
}
echo -n "LS: "
diff --git a/tests/canonical-benchmarks.bash b/tests/canonical-benchmarks.bash
index b7c2d38..1a5bf3a 100755
--- a/tests/canonical-benchmarks.bash
+++ b/tests/canonical-benchmarks.bash
@@ -20,8 +20,13 @@ fi
# cd to TESTDIR
cd "$1"
+# Execute command, discard all stdout output, print elapsed time
+# (to stderr, unfortunately).
function etime {
- LC_ALL=C /usr/bin/time -f %e 2>&1 $@ > /dev/null
+ # Make the bash builtin "time" print out only the elapse wall clock
+ # seconds
+ TIMEFORMAT=%R
+ time "$@" > /dev/null
}
echo -n "WRITE: "