Commit 873de691 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Print the geometric mean

parent 6987b652
......@@ -4,14 +4,27 @@ import subprocess
import time
def run_tests(executables, benchmarks):
times = [[] for e in executables]
for b in benchmarks:
for e in executables:
for e, time_list in zip(executables, times):
start = time.time()
subprocess.check_call(e + [b], stdout=open("/dev/null", 'w'))
elapsed = time.time() - start
print "%s %s: % 4.1fs" % (" ".join(e).rjust(25), b.ljust(35), elapsed)
time_list.append(elapsed)
for e, time_list in zip(executables, times):
t = 1
for elapsed in time_list:
t *= elapsed
t **= (1.0 / len(time_list))
print "%s %s: % 4.1fs" % (" ".join(e).rjust(25), "geomean".ljust(35), t)
def main():
executables = [["./pyston_release", "-q"]]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment