MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / write_command_output

Function write_command_output

src/local_logger/mod.rs:65–70  ·  view source on GitHub ↗

Write a chunk of benchmark command output to the terminal: into the rolling buffer when one is active, otherwise verbatim to `writer`.

(text: &str, raw_bytes: &[u8], writer: &mut impl Write)

Source from the content-addressed store, hash-verified

63/// Write a chunk of benchmark command output to the terminal: into the rolling
64/// buffer when one is active, otherwise verbatim to `writer`.
65pub(crate) fn write_command_output(text: &str, raw_bytes: &[u8], writer: &mut impl Write) {
66 if rolling_buffer::try_push(text) {
67 return;
68 }
69 suspend_progress_bar(|| writer.write_all(raw_bytes).unwrap());
70}
71
72/// A snapshot of a log record that can be stored across the rolling-buffer
73/// lifetime (the original `log::Record` borrows data and cannot be kept).

Callers 1

log_teeFunction · 0.85

Calls 2

try_pushFunction · 0.85
suspend_progress_barFunction · 0.85

Tested by

no test coverage detected