--- Benchmark ---
(b *testing.B)
| 491 | // --- Benchmark --- |
| 492 | |
| 493 | func BenchmarkRender_SmallLog(b *testing.B) { |
| 494 | lv := NewLogViewer() |
| 495 | lv.SetSize(120, 40) |
| 496 | |
| 497 | for i := 0; i < 10; i++ { |
| 498 | lv.AddEvent(makeToolStartEvent("Read", map[string]interface{}{ |
| 499 | "file_path": fmt.Sprintf("/file%d.go", i), |
| 500 | })) |
| 501 | lv.AddEvent(makeToolResultEvent(fmt.Sprintf("content of file %d", i))) |
| 502 | } |
| 503 | lv.ScrollToTop() |
| 504 | |
| 505 | b.ResetTimer() |
| 506 | for i := 0; i < b.N; i++ { |
| 507 | lv.Render() |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | func BenchmarkRender_LargeLog(b *testing.B) { |
| 512 | lv := NewLogViewer() |
nothing calls this directly
no test coverage detected