-
Notifications
You must be signed in to change notification settings - Fork 148
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 prefix matching.
#1279
Make --include
and --exclude
use prefix matching.
#1279
Conversation
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`.
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 was quite fond of the new exact matching behaviour, but it's true that after TBBU (the big benchmark upgrade) it's quite annoying and prefixes are the way to go 👍
The PR and commit name seems to be wrong (it describes the previous change).
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.
This makes a lot of sense. I am worried we'll end up hitting the old gotcha if we introduce something like serde_json
as a benchmark...
The code could assert that the benchmarks don't share prefixes, this would be then caught in tests on CI if such benchmark would be introduced. But it would be a bit fragile (a prefix can also be a single char..) and it would not allow us to add Maybe we could just print a warning/info log if a prefix matches more benchmarks? Although if the documentation/help explicitly says that it uses prefixes, that's kind of the expected behaviour. |
Presumably that would be |
It's probably not that bad if someone accidentally matches more than benchmark so I'm fine with merging this. We can just keep an eye out if this causes issues in the future. |
--include
and --exclude
use exact matching.--include
and --exclude
use prefix matching.
I was going to fix the commit message, but it's already been merged :) |
Whoops! Sorry! 😀 |
In #1138 I changed
--include
/--exclude
to do exact matching ofbenchmark 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 matchstm32f4-0.14.0
.