Skip to content
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

Make --include and --exclude use exact matching. #1138

Merged

Conversation

nnethercote
Copy link
Contributor

Currently they do substring matching. But because some benchmarks have a
name that is a substring of another it's impossible to match some
benchmarks by themselves. E.g.:

  • Want webrender? You'll get webrender-wrench too.
  • Want syn? You'll get deeply-nested-async too.
  • Want deeply-nested? You'll get deeply-nested-async and
    deeply-nested-closures too.

This commit makes the matching exact. As a heavy user of these tools I
think this is a good trade-off. It makes some things possible that are
currently impossible (e.g. including or excluding just webrender), at
the cost of more typing on occasion, e.g. --include ctfe-stress-4
instead of --include ctfe.

(Note: if you specify something that doesn't match any benchmark's name
the command will give an error.)

Currently they do substring matching. But because some benchmarks have a
name that is a substring of another it's impossible to match some
benchmarks by themselves. E.g.:
- Want `webrender`? You'll get `webrender-wrench` too.
- Want `syn`? You'll get `deeply-nested-async` too.
- Want `deeply-nested`? You'll get `deeply-nested-async` and
  `deeply-nested-closures` too.

This commit makes the matching exact. As a heavy user of these tools I
think this is a good trade-off. It makes some things possible that are
currently impossible (e.g. including or excluding just `webrender`), at
the cost of more typing on occasion, e.g. `--include ctfe-stress-4`
instead of `--include ctfe`.

(Note: if you specify something that doesn't match any benchmark's name
the command will give an error.)
@Mark-Simulacrum Mark-Simulacrum merged commit 2600686 into rust-lang:master Jan 7, 2022
@nnethercote nnethercote deleted the exact-include-exclude branch January 9, 2022 18:35
nnethercote added a commit to nnethercote/rustc-perf that referenced this pull request Apr 6, 2022
In rust-lang#1138 I changed `--include`/`--exclude` to do exact matching of
benchmark names. This was a good idea at the time, but since then we
have renamed many benchmarks. There is now no benchmark with a name that
is a prefix of another benchmark's name. Also, we now have version
numbers in many benchmark names, which are a pain to remember and type.

This commit lets you specify a benchmark name by prefix. E.g.
`--include=stm` will match `stm32f4-0.14.0`.
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