diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2015-10-02 17:06:30 -0400 |
---|---|---|
committer | Connor Abbott <cwabbott0@gmail.com> | 2015-10-02 17:10:12 -0400 |
commit | 11dff76fe6e496f3aacdb5fe4487fe303f8247d0 (patch) | |
tree | 4e9bafb8f14ec9c6552f370ac3e5cd3bf843a61c | |
parent | 166c8f1074a507481bacb732b64feeb1d1fcd0f2 (diff) |
report.py: add an option for which measurements to reporti965-sched
-rwxr-xr-x | report.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -48,14 +48,19 @@ def get_result_string(p, b, a): p = p + ' ' return p + change(b, a) +def split_list(string): + return string.split(",") def main(): parser = argparse.ArgumentParser() + parser.add_argument("--measurements", "-m", type=split_list, + default=["instructions", "cycles", "loops"], + help="comma-separated list of measurements to report") parser.add_argument("before", type=get_results, help="the output of the original code") parser.add_argument("after", type=get_results, help="the output of the new code") args = parser.parse_args() - for measurement in ["instructions", "cycles", "loops"]: + for measurement in args.measurements: total_before = 0 total_after = 0 affected_before = 0 |