Skip to content

Direction lattice #1395

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

Merged
merged 2 commits into from
Aug 12, 2022
Merged

Conversation

nnethercote
Copy link
Contributor

Best reviewed one commit at a time.

Currently `Direction`s are combined in two places.
- `populate_report`, which uses a match. It gives the primary and
  secondary directions equal weight.
- `summarize_run`, which uses `Option::or`. It gives the primary
  direction more weight; the secondary direction will only be used if
  the primary direction is `None`.

The latter seems suboptimal. If, for example, there are only
improvements in the primary benchmarks and only regressions in the
secondary benchmarks, the overall result should be "mixed results" not
"improvements".

This commit makes both places use the combination from
`populate_report`. `Direction` forms a simple lattice and that
combination is the "join" operation. `Option` is no longer needed.
@nnethercote nnethercote requested a review from rylev August 12, 2022 06:25
Copy link
Member

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I have a thought about naming, but feel free to ignore it and merge.

@nnethercote nnethercote merged commit a5976eb into rust-lang:master Aug 12, 2022
@nnethercote nnethercote deleted the direction-lattice branch August 12, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants