tests/bench: import "slightly more reliable time" script
parent
eb402c8bd4
commit
8ca8b43df1
@ -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)))
|
Loading…
Reference in New Issue