summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2015-10-02 17:06:30 -0400
committerConnor Abbott <cwabbott0@gmail.com>2015-10-02 17:10:12 -0400
commit11dff76fe6e496f3aacdb5fe4487fe303f8247d0 (patch)
tree4e9bafb8f14ec9c6552f370ac3e5cd3bf843a61c
parent166c8f1074a507481bacb732b64feeb1d1fcd0f2 (diff)
report.py: add an option for which measurements to reporti965-sched
-rwxr-xr-xreport.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/report.py b/report.py
index bc3a640..f9445dd 100755
--- a/report.py
+++ b/report.py
@@ -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