BenchmarkScanner_LargeQuery benchmarks scanning large SQL queries
(b *testing.B)
| 185 | |
| 186 | // BenchmarkScanner_LargeQuery benchmarks scanning large SQL queries |
| 187 | func BenchmarkScanner_LargeQuery(b *testing.B) { |
| 188 | // Generate a large query with many columns |
| 189 | sql := generateLargeSelectQuery(100) // 100 columns |
| 190 | scanner := NewScanner() |
| 191 | |
| 192 | tree := parseSQL(b, sql) |
| 193 | defer ast.ReleaseAST(tree) |
| 194 | |
| 195 | b.ReportAllocs() |
| 196 | b.ResetTimer() |
| 197 | for i := 0; i < b.N; i++ { |
| 198 | scanner.Scan(tree) |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | // BenchmarkScanner_Parallel benchmarks concurrent scanning |
| 203 | func BenchmarkScanner_Parallel(b *testing.B) { |
nothing calls this directly
no test coverage detected