(b *testing.B)
| 109 | } |
| 110 | |
| 111 | func BenchmarkParseBytes(b *testing.B) { |
| 112 | sql := []byte("SELECT u.id, u.name, u.email FROM users u JOIN orders o ON u.id = o.user_id WHERE u.active = true AND o.total > 100 ORDER BY o.created_at DESC LIMIT 50") |
| 113 | b.ResetTimer() |
| 114 | for i := 0; i < b.N; i++ { |
| 115 | result, err := parser.ParseBytes(sql) |
| 116 | if err == nil { |
| 117 | ast.ReleaseAST(result) |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | func BenchmarkValidateLargeSQL(b *testing.B) { |
| 123 | // Build a large SQL query |
nothing calls this directly
no test coverage detected