[Mesa-dev] [PATCH 5/7] report.py: Add option to only display measurements that have changes
Kenneth Graunke
kenneth at whitecape.org
Thu Jan 18 22:47:54 UTC 2018
On Friday, January 12, 2018 12:06:59 PM PST Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> This is useful for preparing data to go in a Mesa commit message.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> report.py | 53 +++++++++++++++++++++++++++++++----------------------
> 1 file changed, 31 insertions(+), 22 deletions(-)
>
> diff --git a/report.py b/report.py
> index e0068bc..72752c1 100755
> --- a/report.py
> +++ b/report.py
> @@ -62,6 +62,8 @@ def main():
> 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("--changes-only", "-c", action="store_true", default=False,
> + help="only show measurements that have changes")
> 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()
> @@ -116,14 +118,14 @@ def main():
> if len(helped) > 0:
> print("")
>
> - hurt.sort(
> - key=lambda k: args.after[k][m] if args.before[k][m] == 0 else float(args.after[k][m] - args.before[k][m]) / args.before[k][m])
> - for p in hurt:
> - namestr = p[0] + " " + p[1]
> - print(m + " HURT: " + get_result_string(
> - namestr, args.before[p][m], args.after[p][m]))
> - if len(hurt) > 0:
> - print("")
> + hurt.sort(
> + key=lambda k: args.after[k][m] if args.before[k][m] == 0 else float(args.after[k][m] - args.before[k][m]) / args.before[k][m])
> + for p in hurt:
> + namestr = p[0] + " " + p[1]
> + print(m + " HURT: " + get_result_string(
> + namestr, args.before[p][m], args.after[p][m]))
> + if len(hurt) > 0:
> + print("")
Assuming you squash this back into patch 4 where it belongs, and take
Dylan's feedback, then patches 1-6 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
You mentioned that patch 7 is no good, so I don't plan to look at it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180118/24cb716e/attachment.sig>
More information about the mesa-dev
mailing list