runTestBatch runs a batch of tests and reports statistics
(t *testing.T, files []SQLTestFile, batchName string)
| 389 | |
| 390 | // runTestBatch runs a batch of tests and reports statistics |
| 391 | func runTestBatch(t *testing.T, files []SQLTestFile, batchName string) { |
| 392 | if len(files) == 0 { |
| 393 | t.Skip("No files to test") |
| 394 | } |
| 395 | |
| 396 | successCount := 0 |
| 397 | var totalTime time.Duration |
| 398 | |
| 399 | for _, file := range files { |
| 400 | result := testSQLFile(t, file) |
| 401 | if result.Success { |
| 402 | successCount++ |
| 403 | } else { |
| 404 | t.Logf("Failed: %s - %v", file.Name, result.Error) |
| 405 | } |
| 406 | totalTime += result.ParseTime |
| 407 | } |
| 408 | |
| 409 | avgTime := totalTime / time.Duration(len(files)) |
| 410 | successRate := 100.0 * float64(successCount) / float64(len(files)) |
| 411 | |
| 412 | t.Logf("\n=== %s Summary ===", batchName) |
| 413 | t.Logf("Total files: %d", len(files)) |
| 414 | t.Logf("Successful: %d", successCount) |
| 415 | t.Logf("Failed: %d", len(files)-successCount) |
| 416 | t.Logf("Success rate: %.2f%%", successRate) |
| 417 | t.Logf("Average parse time: %v", avgTime) |
| 418 | t.Logf("Total parse time: %v", totalTime) |
| 419 | } |
| 420 | |
| 421 | // BenchmarkIntegration_SimpleQueries benchmarks simple queries across all dialects |
| 422 | func BenchmarkIntegration_SimpleQueries(b *testing.B) { |
no test coverage detected