MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / BenchmarkDocumentManager_Open

Function BenchmarkDocumentManager_Open

pkg/lsp/handler_bench_test.go:387–397  ·  view source on GitHub ↗

BenchmarkDocumentManager_Open benchmarks document opening

(b *testing.B)

Source from the content-addressed store, hash-verified

385
386// BenchmarkDocumentManager_Open benchmarks document opening
387func BenchmarkDocumentManager_Open(b *testing.B) {
388 dm := NewDocumentManager()
389 sql := "SELECT * FROM users WHERE active = true"
390
391 b.ReportAllocs()
392 b.ResetTimer()
393 for i := 0; i < b.N; i++ {
394 uri := fmt.Sprintf("file:///test%d.sql", i)
395 dm.Open(uri, "sql", 1, sql)
396 }
397}
398
399// BenchmarkDocumentManager_Get benchmarks document retrieval
400func BenchmarkDocumentManager_Get(b *testing.B) {

Callers

nothing calls this directly

Calls 2

OpenMethod · 0.95
NewDocumentManagerFunction · 0.85

Tested by

no test coverage detected