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

Function make_test_buffer

src/local_logger/rolling_buffer/tests.rs:4–17  ·  view source on GitHub ↗

Create a RollingBuffer with fixed dimensions for deterministic test output.

(title: &str, term_width: usize, max_lines: usize)

Source from the content-addressed store, hash-verified

2
3/// Create a RollingBuffer with fixed dimensions for deterministic test output.
4fn make_test_buffer(title: &str, term_width: usize, max_lines: usize) -> RollingBuffer {
5 RollingBuffer {
6 lines: VecDeque::with_capacity(max_lines),
7 max_lines,
8 total_lines: 0,
9 rendered_count: 0,
10 term: Term::stderr(),
11 term_width,
12 active: true,
13 title: title.to_string(),
14 start: Instant::now(),
15 finished: false,
16 }
17}
18
19/// Strip ANSI codes and join frame lines for readable snapshots.
20fn render_stripped(rb: &RollingBuffer) -> String {

Calls

no outgoing calls

Tested by

no test coverage detected