(b *testing.B)
| 97 | } |
| 98 | |
| 99 | func BenchmarkParseForComparison(b *testing.B) { |
| 100 | sql := "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" |
| 101 | input := []byte(sql) |
| 102 | b.ResetTimer() |
| 103 | for i := 0; i < b.N; i++ { |
| 104 | result, err := parser.ParseBytes(input) |
| 105 | if err == nil { |
| 106 | ast.ReleaseAST(result) |
| 107 | } |
| 108 | } |
| 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") |
nothing calls this directly
no test coverage detected