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

Function BenchmarkEditTool_SimpleEdit

pkg/tools/builtin/edit_test.go:232–253  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

230}
231
232func BenchmarkEditTool_SimpleEdit(b *testing.B) {
233 if testing.Short() {
234 b.Skip("Skipping benchmark in short mode")
235 }
236
237 tool, err := NewEditTool(nil)
238 if err != nil {
239 b.Fatalf("Failed to create Edit tool: %v", err)
240 }
241
242 helper := NewTestHelper(&testing.T{})
243 testFile := helper.CreateTempFile("benchmark.txt", "old content line\nold content line\nold content line")
244 defer helper.CleanupAll()
245
246 input := map[string]any{
247 "file_path": testFile,
248 "old_string": "old content",
249 "new_string": "new content",
250 }
251
252 BenchmarkTool(b, tool, input)
253}

Callers

nothing calls this directly

Calls 5

CreateTempFileMethod · 0.95
CleanupAllMethod · 0.95
NewEditToolFunction · 0.85
NewTestHelperFunction · 0.85
BenchmarkToolFunction · 0.85

Tested by

no test coverage detected