MCPcopy Create free account
hub / github.com/astercloud/aster / BenchmarkReadTool_LargeFile

Function BenchmarkReadTool_LargeFile

pkg/tools/builtin/read_test.go:451–472  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

449}
450
451func BenchmarkReadTool_LargeFile(b *testing.B) {
452 if testing.Short() {
453 b.Skip("Skipping large file benchmark in short mode")
454 }
455
456 tool, err := NewReadTool(nil)
457 if err != nil {
458 b.Fatalf("Failed to create Read tool: %v", err)
459 }
460
461 helper := NewTestHelper(&testing.T{})
462 defer helper.CleanupAll()
463
464 largeContent := strings.Repeat("Benchmark line content.\n", 1024*10) // ~170KB
465 filePath := helper.CreateTempFile("large_benchmark.txt", largeContent)
466
467 input := map[string]any{
468 "file_path": filePath,
469 }
470
471 BenchmarkTool(b, tool, input)
472}

Callers

nothing calls this directly

Calls 5

CleanupAllMethod · 0.95
CreateTempFileMethod · 0.95
NewReadToolFunction · 0.85
NewTestHelperFunction · 0.85
BenchmarkToolFunction · 0.85

Tested by

no test coverage detected