BenchmarkDocumentManager_Open benchmarks document opening
(b *testing.B)
| 385 | |
| 386 | // BenchmarkDocumentManager_Open benchmarks document opening |
| 387 | func 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 |
| 400 | func BenchmarkDocumentManager_Get(b *testing.B) { |
nothing calls this directly
no test coverage detected