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

Function BenchmarkDocumentManager_Get

pkg/lsp/handler_bench_test.go:400–409  ·  view source on GitHub ↗

BenchmarkDocumentManager_Get benchmarks document retrieval

(b *testing.B)

Source from the content-addressed store, hash-verified

398
399// BenchmarkDocumentManager_Get benchmarks document retrieval
400func BenchmarkDocumentManager_Get(b *testing.B) {
401 dm := NewDocumentManager()
402 dm.Open("file:///test.sql", "sql", 1, "SELECT * FROM users")
403
404 b.ReportAllocs()
405 b.ResetTimer()
406 for i := 0; i < b.N; i++ {
407 _, _ = dm.Get("file:///test.sql")
408 }
409}
410
411// BenchmarkDocumentManager_Update benchmarks document updates
412func BenchmarkDocumentManager_Update(b *testing.B) {

Callers

nothing calls this directly

Calls 3

OpenMethod · 0.95
GetMethod · 0.95
NewDocumentManagerFunction · 0.85

Tested by

no test coverage detected