From 8ca8b43df1c0ba94739b1c03a65e215dd1d80944 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Mon, 2 Apr 2018 07:30:06 +0000 Subject: [PATCH] tests/bench: import "slightly more reliable time" script --- tests/bench/megatime.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tests/bench/megatime.py diff --git a/tests/bench/megatime.py b/tests/bench/megatime.py new file mode 100755 index 00000000..0964424d --- /dev/null +++ b/tests/bench/megatime.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +import sys +import os +import time + + +times = [] +for x in xrange(5): + t0 = time.time() + os.spawnvp(os.P_WAIT, sys.argv[1], sys.argv[1:]) + t = time.time() - t0 + times.append(t) + print '+++', t + +print 'all:', times +print 'min %s max %s diff %s' % (min(times), max(times), (max(times) - min(times)))