Moved benchmark to separate header, output summary to stdout

Refs #269
This commit is contained in:
saschawillems 2017-08-26 14:05:48 +02:00
parent 25813e79e7
commit b4870a6e7e
5 changed files with 92 additions and 63 deletions

View file

@ -70,15 +70,15 @@ print("Benchmarking all examples...")
os.makedirs("./benchmark", exist_ok=True)
for example in EXAMPLES:
print("Running %s (%d/%d) in benchmark mode" % (example, CURR_INDEX+1, len(EXAMPLES)))
print("---- (%d/%d) Running %s in benchmark mode ----" % (CURR_INDEX+1, len(EXAMPLES), example))
if platform.system() == 'Linux':
RESULT_CODE = subprocess.call("./%s %s ./benchmark/%s" % (example, ARGS, example), shell=True)
else:
RESULT_CODE = subprocess.call("%s %s ./benchmark/%s" % (example, ARGS, example))
if RESULT_CODE == 0:
print("\tResults written to ./benchmark/%s.csv" % example)
print("Results written to ./benchmark/%s.csv" % example)
else:
print("\tError, result code = %d" % RESULT_CODE)
print("Error, result code = %d" % RESULT_CODE)
CURR_INDEX += 1
print("Benchmark run finished")