-
Notifications
You must be signed in to change notification settings - Fork 157
Use a summary table for PR comments #1245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you're missing a run of cargo fmt
to get CI passing.
- Should the table also be used in the weekly triage or not?
Yes I think that would be helpful
- I don't really like that write_summary_table is a method on ComparisonSummary, this should be a free function I think. Same with write_summary_lines.
Feel free to make this refactor 😊
- Currently, primary and secondary benchmarks are not distinguished, because this information is not currently propagated to the performance summaries. Should we add the benchmark configuration to TestResultComparison or pass some Map<BenchmarkName, BenchmarkData> to the summary?
I'd like for this change to get in before we merge if possible. It seems somewhat redundant to put the category in with the TestResultComparison
since that data will be the same for all test cases with the same benchmark. So having some BenchMark
to Category
map probably would work best.
- Should columns without any entries be present or not? I.e. should we show 0 entries or just hide the column altogether?
I think we should keep all columns even when they have 0 entries.
To avoid complicating the table render function and to keep category handling out of summaries, I changed it so that the render function directly receives two summaries (primary and secondary) and it is up to the caller to generate these. Since the summary can now be empty, I commented the check that returned One issue is that some columns are split between primary/secondary, but the last one (all relevant changes) contains data for both categories together. I added a TODO comment to the code with possible ways to resolve this, I'll be glad to hear your thoughts. Since the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
Category
is not exported by collector (this was done intentionally as I remember)
Why doesn't the collector export Category
?
One issue is that some columns are split between primary/secondary
It's a shame that GitHub doesn't support more complex tables. If it did we could have the category be a two column wide column that splits into regressions and improvements. Oh well.
I think it's much more interesting to have the average change for the primary category. I think mixing primary and secondary will make for worse data.
I checked Then it was moved in 4009f1e (I don't think that this had a PR). @nnethercote would it be okay if |
Exporting |
Exported |
I would leave changing the summary used in triages for another PR, there are some links being generated there and I'm not sure how to make that work with the table. But for PR comments this should be ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're almost there but there's a few things I'd like addressed.
Now that I look at the table, maybe it would be better to group the columns by category and not by direction? |
I imagine that folks are generally more interested in regressions (i.e., improvements are great but for PRs that are not explicitly performance related most people just want to know "did this change make the compiler slower?"). With that in mind I think it makes most sense to show regressions first and then improvements (i.e., group by direction) |
Oh, I'm quite biased, as most of my PRs so far were explicitly focused on improving performance, so I was mostly looking for these improvements :D But you're right, in the general case regressions should be the first. Rebased on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I had one nit, but we can merge this first before addressing that if you want to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@Kobzol the report looks strange rust-lang/rust#95171 (comment) but you must have noticed that's your PR :) maybe a difference in between the header and actual column count ? |
Thanks, I'll check it ASAP. |
This PR implements a new design for reporting performance summaries on PRs.
It looks something like this:
(primary)
(secondary)
(primary)
(secondary)
(primary)
Should the table also be used in the weekly triage or not? (will be left for another PR).
Closes: #1214
Footnotes
number of relevant changes ↩
the arithmetic mean of the percent change ↩