-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[RFC] *Display* aggregates only. #664
Comments
LebedevRI
added a commit
that referenced
this issue
Sep 12, 2018
There is a flag https://github.com/google/benchmark/blob/d9cab612e40017af10bddaa5b60c7067032a9e1c/src/benchmark.cc#L75-L78 and a call https://github.com/google/benchmark/blob/d9cab612e40017af10bddaa5b60c7067032a9e1c/include/benchmark/benchmark.h#L837-L840 But that affects everything, every reporter, destination: https://github.com/google/benchmark/blob/d9cab612e40017af10bddaa5b60c7067032a9e1c/src/benchmark.cc#L316 It would be quite useful to have an ability to be more picky. More specifically, i would like to be able to only see the aggregates in the on-screen output, but for the file output to still contain everything. The former is useful in case of a lot of repetition (or even more so if every iteration is reported separately), while the former is **great** for tooling. Fixes #664
JBakamovic
pushed a commit
to JBakamovic/benchmark
that referenced
this issue
Dec 6, 2018
There is a flag https://github.com/google/benchmark/blob/d9cab612e40017af10bddaa5b60c7067032a9e1c/src/benchmark.cc#L75-L78 and a call https://github.com/google/benchmark/blob/d9cab612e40017af10bddaa5b60c7067032a9e1c/include/benchmark/benchmark.h#L837-L840 But that affects everything, every reporter, destination: https://github.com/google/benchmark/blob/d9cab612e40017af10bddaa5b60c7067032a9e1c/src/benchmark.cc#L316 It would be quite useful to have an ability to be more picky. More specifically, i would like to be able to only see the aggregates in the on-screen output, but for the file output to still contain everything. The former is useful in case of a lot of repetition (or even more so if every iteration is reported separately), while the former is **great** for tooling. Fixes google#664
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
There is a flag
benchmark/src/benchmark.cc
Lines 75 to 78 in d9cab61
and a call
benchmark/include/benchmark/benchmark.h
Lines 837 to 840 in d9cab61
But that affects everything, every reporter, destination:
benchmark/src/benchmark.cc
Line 316 in d9cab61
It would be quite useful to have an ability to be more picky.
More specifically, i would like to be able to only see the aggregates in the on-screen output,
but for the file output to still contain everything. The former is useful in case of a lot of repetition
(or even more so if every iteration is reported separately), while the former is great for tooling.
Now the problem. I'm not sure how best to do it.
The most straight-forward solution i can think of is to filter the results here:
benchmark/src/benchmark.cc
Lines 466 to 471 in d9cab61
So the file reporter will still receive the full
std::vector<BenchmarkReporter::Run> reports
, whiledisplay_reporter
may (depending on the configuration) only receive the aggregates.Alternative solutions could include modifying the API of
BenchmarkReporter
,and every implementation, to skip non-aggregates, depending on some additional config params.
Thoughts?
The text was updated successfully, but these errors were encountered: