summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-03-25 11:19:44 -0700
committerEric Anholt <eric@anholt.net>2013-03-25 11:19:44 -0700
commitb3470dbf640bb899ac166767498ad04863be9278 (patch)
tree05b2c098426cf954faf71c97a0e95a4fd0c36cd5
parent30b2e7c08a1bbe2dc8262d42a11f86d14e412041 (diff)
Print the runtime of the runner script.
I often wonder about this after the fact, and it's slow enough that running again under "time" sucks.
-rwxr-xr-xrun.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/run.py b/run.py
index be88c0b..49d093e 100755
--- a/run.py
+++ b/run.py
@@ -2,7 +2,7 @@
from getopt import getopt, GetoptError
import re
-import sys, os
+import sys, os, time
import subprocess
from concurrent.futures import ThreadPoolExecutor
from multiprocessing import cpu_count
@@ -111,9 +111,14 @@ def main():
print("./bin must be a symlink to a built piglit bin directory")
sys.exit(1)
+ runtimebefore = time.time()
+
executor = ThreadPoolExecutor(cpu_count())
for t in executor.map(run_test, args):
sys.stdout.write(t)
+ runtimeafter = time.time()
+ print("shader-db run completed in {:.1} secs".format(runtimeafter - runtimebefore))
+
if __name__ == "__main__":
main()