Commit 26cb37c5 by Tobias Langer

Added support for multiple analysis files.

parent 999540e2
......@@ -12,6 +12,7 @@ def calc_utilization(tasks):
def main():
parser = argparse.ArgumentParser(description='Generate plotable results from the experiments.')
parser.add_argument('results', type=str, nargs='+', help='file containing experiment results.')
parser.add_argument('analysis', type=str, nargs='+', help='name identifying the analysis results.')
args = parser.parse_args()
......@@ -85,27 +86,27 @@ def main():
except KeyError:
out[outkey] = [(s2s, e2e, misses, response)]
with open('analysis/s2s.dat', 'w') as s2sfile:
with open('analysis/{}_s2s.dat'.format(args.analysis), 'w') as s2sfile:
for key, value in out.items():
for elem in value:
print('{}; {}'.format(key, elem[0]), file=s2sfile)
with open('analysis/e2e.dat', 'w') as e2efile:
with open('analysis/{}_e2e.dat'.format(args.analysis), 'w') as e2efile:
for key, value in out.items():
for elem in value:
print('{}; {}'.format(key, elem[1]), file=e2efile)
with open('analysis/misses.dat', 'w') as missesfile:
with open('analysis/{}_misses.dat'.format(args.analysis), 'w') as missesfile:
for key, value in out.items():
for elem in value:
print('{}; {}'.format(key, elem[2]), file=missesfile)
with open('analysis/misses_avrg.dat', 'w') as missesavrgfile:
with open('analysis/{}_misses_avrg.dat'.format(args.analysis), 'w') as missesavrgfile:
for key, value in out.items():
for elem in value:
print('{}; {}'.format(key, elem[3]), file=missesavrgfile)
with open('analysis/response.dat', 'w') as responsefile:
with open('analysis/{}_response.dat'.format(args.analysis), 'w') as responsefile:
for key, value in out.items():
for elem in value:
print('{}; {}'.format(key, elem[3]), file=responsefile)
......
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 sign in to comment