[Mesa-dev] [PATCH shader-db 2/2] report.py: add an option for which measurements to report
Connor Abbott
cwabbott0 at gmail.com
Fri Oct 2 14:37:36 PDT 2015
Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
---
report.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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
--
2.1.0
More information about the mesa-dev
mailing list