MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / BenchmarkValidate

Function BenchmarkValidate

pkg/sql/parser/validate_test.go:91–97  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

89}
90
91func BenchmarkValidate(b *testing.B) {
92 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"
93 b.ResetTimer()
94 for i := 0; i < b.N; i++ {
95 _ = parser.Validate(sql)
96 }
97}
98
99func 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"

Callers

nothing calls this directly

Calls 1

ValidateFunction · 0.92

Tested by

no test coverage detected