Repository navigation
benchmark: exposed google benchmark's intrinsic command-line options - #15133
Conversation
If an argument containing the word "help" is passed, then it not passed to the ::benchmark:Initialize() method, and handled separately Signed-off-by: Rajdeep Roy Chowdhury <[email protected]>
antoniovicente
left a comment
There was a problem hiding this comment.
thanks for the improvement to command line handling.
| } | ||
| } | ||
|
|
||
| if (!is_help_flag) { |
There was a problem hiding this comment.
Can you add a comment explaining why --help needs to be treated in a special way?
There was a problem hiding this comment.
if we don't take care of the --help separately, then the output is actually "benchmark --help".
benchmark [--benchmark_list_tests={true|false}]
[--benchmark_filter=<regex>]
[--benchmark_min_time=<min_time>]
[--benchmark_repetitions=<num_repetitions>]
[--benchmark_report_aggregates_only={true|false}]
[--benchmark_display_aggregates_only={true|false}]
[--benchmark_format=<console|json|csv>]
[--benchmark_out=<filename>]
[--benchmark_out_format=<json|console|csv>]
[--benchmark_color={auto|true|false}]
[--benchmark_counters_tabular={true|false}]
[--v=<verbosity>]
Here, the flag details like --skip_expensive_benchmarks and other custom-defined flags are missing.
That's why we are showing the older help results.
There was a problem hiding this comment.
Preferring help documentation for the custom defined flags makes sense to me. Could you add a comment to the code that explains that we're checking for the --help flag in order to get that behavior?
Signed-off-by: Rajdeep Roy Chowdhury <[email protected]>
antoniovicente
left a comment
There was a problem hiding this comment.
Change looks good.
The clang tidy check failure looks like noise, not sure what about your PR (if anything) triggered it.
| } | ||
| } | ||
|
|
||
| if (!is_help_flag) { |
There was a problem hiding this comment.
Preferring help documentation for the custom defined flags makes sense to me. Could you add a comment to the code that explains that we're checking for the --help flag in order to get that behavior?
Signed-off-by: Rajdeep Roy Chowdhury <[email protected]>
Signed-off-by: Rajdeep Roy Chowdhury <[email protected]>
antoniovicente
left a comment
There was a problem hiding this comment.
Thanks for the fix to flags handling.
|
@envoyproxy/senior-maintainers Could use your review. The clang-tidy breakage seems to be in base libraries and not really fixable. |
Commit Message: benchmark: exposed google benchmark's intrinsic command-line options
Additional Description: If an argument containing the word "help" is passed, then it not
passed to the
::benchmark:Initialize()method, and handled separately.This PR addresses Issue #15076.
Risk Level: Low
Testing: No
Docs Changes: No
Signed-off-by: Rajdeep Roy Chowdhury [email protected]