package tui import "testing" // A streamed token redraws the whole scrollback, so the cost of one render of // a long session is the cost of every token of the next answer. func BenchmarkTranscriptRender(b *testing.B) { tr := newTranscript(100) for range 50 { tr.appendDelta(sampleMarkdown) tr.closeOpen() } b.ResetTimer() for b.Loop() { tr.dirty = true _ = tr.render() } }