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

Function BenchmarkReadTool_SmallFile

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

Source from the content-addressed store, hash-verified

431}
432
433func BenchmarkReadTool_SmallFile(b *testing.B) {
434 tool, err := NewReadTool(nil)
435 if err != nil {
436 b.Fatalf("Failed to create Read tool: %v", err)
437 }
438
439 helper := NewTestHelper(&testing.T{})
440 defer helper.CleanupAll()
441
442 filePath := helper.CreateTempFile("benchmark.txt", "Small benchmark content")
443
444 input := map[string]any{
445 "file_path": filePath,
446 }
447
448 BenchmarkTool(b, tool, input)
449}
450
451func BenchmarkReadTool_LargeFile(b *testing.B) {
452 if testing.Short() {

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