-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
file_reporter argument to RunSpecifiedBenchmarks should be optional, but is not #836
Comments
The documentation does tend to lag. PRs welcome :)
For the second issue, i'd take it as read that the behaviour of the code is
the desired behaviour. If you want to debate that it should be the
alternative then go for it, but the idea is that if you've gone to the
effort of providing us with a file reporter, you probably meant to use it
(and this error avoids the obvious bug report).
A third option would be to take it as given that if a custom file reporter
is provided we should use it (ie, implicitly set benchmark_out to some
default value). that may be surprising?
…On Fri, Jul 12, 2019 at 12:58 PM Thomas Lang ***@***.***> wrote:
In the comment/documentation of RunSpecifiedBenchmarks in benchmark.h, it
says:
// The second and third overload use the specified 'display_reporter' and
// 'file_reporter' respectively. 'file_reporter' will write to the file
// specified
// by '--benchmark_output'. If '--benchmark_output' is not given the
// 'file_reporter' is ignored.
The first problem is that the correct argument name is benchmark_out (I
assume it was changed at some point).
The second problem is that the last sentence is not true. If '
--benchmark_out' is not given, the following message is displayed:
A custom file reporter was provided but --benchmark_out= was not specified.
I don't know which is the intended behaviour, but to me, it would make
sense that the file_reporter is ignored if '--benchmark_out' is not
specified.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#836?email_source=notifications&email_token=AAD4QMVK2LV2DZAMG4D5DF3P7BWYFA5CNFSM4ICIKNG2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G63S7EQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD4QMTWYEJMKHWRJPF463LP7BWYFANCNFSM4ICIKNGQ>
.
|
Thank you for your answer and sorry for my late response. My intention was to provide a custom This is exactly how it works if no custom If a custom This difference in behavior is why I thought that it is probably an error (not just in the documentation, but in the behavior). But I might just have overlooked something or misunderstood the function parameters? |
In the comment/documentation of
RunSpecifiedBenchmarks
in benchmark.h, it says:The first problem is that the correct argument name is benchmark_out (I assume it was changed at some point).
The second problem is that the last sentence is not true. If ' --benchmark_out' is not given, the following message is displayed:
I don't know which is the intended behavior, but to me, it would make sense that the
file_reporter
is ignored if '--benchmark_out' is not specified.The text was updated successfully, but these errors were encountered: