Relax CHECK condition in benchmark_runner.cc#938
Conversation
LebedevRI
left a comment
There was a problem hiding this comment.
Thanks.
I think this is missing documentation change, to advertise this new possibility.
And a negative test, if there isn't one already (if there is one, point me to it?),
void BM_zzz(benchmark::State& state) {
// empty
}
|
@chfast ping :) |
I was not able to implement this. Are there any examples of tests expecting |
Hmm. I was thinking of using googletest's death tests, but since there clearly isn't a test So lets not, lets just add the docs :) |
If the benchmark state contains an error, do not expect any iterations has been run. This allows using SkipWithError() and return early from the benchmark function.
4db5fe3 to
9d2f621
Compare
LebedevRI
left a comment
There was a problem hiding this comment.
LGTM, thank you for the contribution!
…enchmark_test_benchmark_test timeouts under tsan also, bump up the googlebenchmark version to pickup the fix to SkipWithError, google/benchmark#938 Signed-off-by: Antonio Vicente <avd@google.com>
…enchmark_test_benchmark_test timeouts under tsan (#12264) also, bump up the googlebenchmark version to pickup the fix to SkipWithError, google/benchmark#938 Signed-off-by: Antonio Vicente <avd@google.com>
…enchmark_test_benchmark_test timeouts under tsan (envoyproxy#12264) also, bump up the googlebenchmark version to pickup the fix to SkipWithError, google/benchmark#938 Signed-off-by: Antonio Vicente <avd@google.com> Signed-off-by: Kevin Baichoo <kbaichoo@google.com>
…enchmark_test_benchmark_test timeouts under tsan (envoyproxy#12264) also, bump up the googlebenchmark version to pickup the fix to SkipWithError, google/benchmark#938 Signed-off-by: Antonio Vicente <avd@google.com> Signed-off-by: chaoqinli <chaoqinli@google.com>
* Add State::error_occurred() * Relax CHECK condition in benchmark_runner.cc If the benchmark state contains an error, do not expect any iterations has been run. This allows using SkipWithError() and return early from the benchmark function. * README.md: document new possible usage of SkipWithError()
If the benchmark state contains an error, do not expect any iterations has been run.
This allows using SkipWithError() and return early from the benchmark function.
Fixes #937.