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

Function BenchmarkScanner_CleanSQL_Raw

pkg/sql/security/scanner_bench_test.go:59–68  ·  view source on GitHub ↗

BenchmarkScanner_CleanSQL_Raw benchmarks scanning raw SQL string

(b *testing.B)

Source from the content-addressed store, hash-verified

57
58// BenchmarkScanner_CleanSQL_Raw benchmarks scanning raw SQL string
59func BenchmarkScanner_CleanSQL_Raw(b *testing.B) {
60 sql := "SELECT id, name, email FROM users WHERE active = true ORDER BY created_at DESC"
61 scanner := NewScanner()
62
63 b.ReportAllocs()
64 b.ResetTimer()
65 for i := 0; i < b.N; i++ {
66 scanner.ScanSQL(sql)
67 }
68}
69
70// BenchmarkScanner_TautologyDetection benchmarks tautology pattern detection
71func BenchmarkScanner_TautologyDetection(b *testing.B) {

Callers

nothing calls this directly

Calls 2

ScanSQLMethod · 0.95
NewScannerFunction · 0.85

Tested by

no test coverage detected