-
Notifications
You must be signed in to change notification settings - Fork 85
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
change print to sys.stdout.write and flush in benchmark_runner.py #2155
Conversation
benchmark/benchmark_runner.py
Outdated
@@ -242,7 +242,8 @@ def run_kuzu(serialized_graph_path): | |||
process = subprocess.Popen( | |||
tuple(benchmark_cmd), stdout=subprocess.PIPE) | |||
for line in iter(process.stdout.readline, b''): | |||
print(line.decode("utf-8"), end='') | |||
sys.stdout.write(line.decode("utf-8")) | |||
sys.stdout.flush() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also use the flush argument of print to explicitly flush, which is a little more concise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
Why is it sufficient to just flush? I would think that we need a lock. |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2155 +/- ##
==========================================
- Coverage 89.65% 89.64% -0.01%
==========================================
Files 989 989
Lines 35712 35712
==========================================
- Hits 32016 32015 -1
- Misses 3696 3697 +1 ☔ View full report in Codecov by Sentry. |
Any idea why MSVC CI is failing? I didn't expect my changes to have any effect on that. |
The benchmark queries are executed sequentially, not in parallel, so it seems to be just a printing issue, not a race condition. |
The MSVC test might fail randomly. I have relaunched it. |
No description provided.