[PATCH 3 of 3] tests: make a stab at approximating wall-clock times
Bryan O'Sullivan
bos at serpentine.com
Tue Jan 5 05:55:38 UTC 2016
# HG changeset patch
# User Bryan O'Sullivan <bos at serpentine.com>
# Date 1451973286 28800
# Mon Jan 04 21:54:46 2016 -0800
# Node ID 0486b6c4d3568ecb7d4e3f8190d200455fb53650
# Parent bc79c418fbf83ba8016ff6838ddd2649c144bd5c
tests: make a stab at approximating wall-clock times
Vaguely empirical observations:
* ".py" tests are about an order of magnitude faster than ".t" tests
* dividing size by 1000 gives an approximation to wall-clock
run time (in seconds) that is not completely ridiculous.
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1861,7 +1861,9 @@ class TestRunner(object):
for kw, mul in slow.items():
if kw in f:
val *= mul
- perf[f] = val
+ if f.endswith('.py'):
+ val /= 10.0
+ perf[f] = val / 1000.0
return perf[f]
tests.sort(key=sortkey)
More information about the Mercurial-devel
mailing list