Commit 0e07853f authored by Ian Romanick's avatar Ian Romanick Add option to only display the final summary

This is useful for preparing data to go in a Mesa commit message.
Signed-off-by: 's avatarIan Romanick <>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <>
parent 081bbf15
......@@ -60,6 +60,8 @@ def main():
parser.add_argument("--measurements", "-m", type=split_list,
default=["instructions", "cycles", "loops", "spills", "fills"],
help="comma-separated list of measurements to report")
parser.add_argument("--summary-only", "-s", action="store_true", default=False,
help="do not show the per-shader helped / hurt data")
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()
......@@ -104,6 +106,7 @@ def main():
if not args.summary_only:
key=lambda k: args.after[k][m] if args.before[k][m] == 0 else float(args.before[k][m] - args.after[k][m]) / args.before[k][m])
for p in helped:
......@@ -137,6 +140,7 @@ def main():
if args.before.get(p) is None:
gained.append(p[0] + " " + p[1])
if not args.summary_only:
for p in lost:
print("LOST: " + p)
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 to comment