diff options
author | Eric Anholt <eric@anholt.net> | 2013-03-25 11:19:44 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-03-25 11:19:44 -0700 |
commit | b3470dbf640bb899ac166767498ad04863be9278 (patch) | |
tree | 05b2c098426cf954faf71c97a0e95a4fd0c36cd5 | |
parent | 30b2e7c08a1bbe2dc8262d42a11f86d14e412041 (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-x | run.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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() |