Skip to content

Remove "BENCHMARK_" prefix from env var version of CLI flags#997

Merged
dmah42 merged 1 commit intomasterfrom
env_var
Aug 18, 2020
Merged

Remove "BENCHMARK_" prefix from env var version of CLI flags#997
dmah42 merged 1 commit intomasterfrom
env_var

Conversation

@dmah42
Copy link
Copy Markdown
Member

@dmah42 dmah42 commented Jul 2, 2020

Fixes #995

As noted in #995, this causes issues when the command line flag already
starts with "benchmark_", which they all do.

Not caught by tests as the test flags didn't start with "benchmark".

Fixes #995
@LebedevRI
Copy link
Copy Markdown
Collaborator

So the problem is that we end up with double BENCHMARK_ prefix?
Can we at least assert that the prefix is already there?

@dmah42
Copy link
Copy Markdown
Member Author

dmah42 commented Jul 2, 2020

So the problem is that we end up with double BENCHMARK_ prefix?
Can we at least assert that the prefix is already there?

there's one flag that doesn't have a benchmark prefix (and shouldn't): v. I don't see a need to assert on something that is a 'best practice' rather than an invariant.

@dmah42 dmah42 marked this pull request as ready for review August 18, 2020 08:16
@dmah42 dmah42 added the next-release PRs or Issues that should be included in the next release label Aug 18, 2020
@dmah42 dmah42 merged commit 5b72b6c into master Aug 18, 2020
@dmah42 dmah42 deleted the env_var branch August 18, 2020 09:02
JBakamovic pushed a commit to JBakamovic/benchmark that referenced this pull request Sep 11, 2020
…google#997)

As noted in google#995, this causes issues when the command line flag already
starts with "benchmark_", which they all do.

Not caught by tests as the test flags didn't start with "benchmark".

Fixes google#995
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes next-release PRs or Issues that should be included in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] BENCHMARK_OUT_FORMAT and BENCHMARK_OUT env variables are not working

3 participants