(b *testing.B)
| 509 | } |
| 510 | |
| 511 | func BenchmarkRender_LargeLog(b *testing.B) { |
| 512 | lv := NewLogViewer() |
| 513 | lv.SetSize(120, 40) // viewport of 40 lines |
| 514 | |
| 515 | // 1000 entries - simulates a long session |
| 516 | for i := 0; i < 1000; i++ { |
| 517 | lv.AddEvent(makeToolStartEvent("Bash", map[string]interface{}{ |
| 518 | "command": fmt.Sprintf("command-%d", i), |
| 519 | })) |
| 520 | lv.AddEvent(makeToolResultEvent(fmt.Sprintf("output line %d", i))) |
| 521 | } |
| 522 | lv.ScrollToTop() |
| 523 | |
| 524 | b.ResetTimer() |
| 525 | for i := 0; i < b.N; i++ { |
| 526 | lv.Render() |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | func BenchmarkRender_LargeLogWithHighlighting(b *testing.B) { |
| 531 | lv := NewLogViewer() |
nothing calls this directly
no test coverage detected