diff options
author | Googler <noreply@google.com> | 2018-07-16 12:55:34 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-16 12:57:50 -0700 |
commit | de3d8bf821dba97471ab4ccfc1f1b1559f0a1cac (patch) | |
tree | 4e9541ae787d0eab36831b9a19dbf0f8520ceada /tools/build_defs/pkg/pkg.bzl | |
parent | 48821a723af41b1561653178e547c7fa86a2a4a6 (diff) |
Ensure BEP file output stream is flushed promptly.
Tulsi uses BEP json output in its UI, to simulate Bazel terminal outptut. This
means we have to promptly flush the stream. It's sufficient to do flushing at
the granularity of whole events, not any specific count of bytes, since whole
events are what's being consumed by the user.
To balance IO throughput and interactivity, let's flush at a regular
sub-second interval.
(The alternative solution of using a stream with smaller buffer could still
end up with small-sized event descriptions buffered arbitrarily long; and
abandoning buffering altogether would be suboptimal for throughput when
writing a long sequence of small build events.)
RELNOTES: None.
PiperOrigin-RevId: 204790794
Diffstat (limited to 'tools/build_defs/pkg/pkg.bzl')
0 files changed, 0 insertions, 0 deletions