Skip to content

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

Merged
LebedevRI merged 3 commits into
google:mainfrom
bstordrup:Issue1734_StreamsNotFlushed
Jan 9, 2024
Merged

Issue 1734: Streams not flushed if not running actual benchmarks#1735
LebedevRI merged 3 commits into
google:mainfrom
bstordrup:Issue1734_StreamsNotFlushed

Conversation

@bstordrup

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@bstordrup

Copy link
Copy Markdown
Contributor Author

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

Comment thread src/benchmark.cc Outdated

@LebedevRI LebedevRI left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Contributor Author

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

@LebedevRI

Copy link
Copy Markdown
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
@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.

2 participants