Skip to content
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

Issue 1734: Streams not flushed if not running actual benchmarks #1735

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

bstordrup
Copy link
Contributor

If the call paths in RunSpecifiedBenchmarks do not go into internal::RunBenchmarks, the Out and Err streams are flushed before exiting.

…RunBenchmarks, the Out and Err streams are flushed before exiting.
@LebedevRI
Copy link
Collaborator

I suppose this makes sense, we can't quite be sure that std::endl is consistently used.
But, let's streamline this: let's flush both streams, but only before exit/return.

@bstordrup
Copy link
Contributor Author

Added some more calls to Out.flush() and Err.flush()

@bstordrup
Copy link
Contributor Author

I noted that there is a complexity test failing, but not sure why.

src/benchmark.cc Outdated Show resolved Hide resolved
Copy link
Collaborator

@LebedevRI LebedevRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@bstordrup
Copy link
Contributor Author

@LebedevRI, you,re welcome... Just started to use the library - it's really cool.

@LebedevRI
Copy link
Collaborator

I'm not sure why those complexity_benchmark failures happen. Looks like there's some non-determinizm.

@LebedevRI LebedevRI merged commit 54e4327 into google:main Jan 9, 2024
78 of 80 checks passed
@bstordrup bstordrup deleted the Issue1734_StreamsNotFlushed branch January 10, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants