(b *testing.B, q string)
| 27 | } |
| 28 | |
| 29 | func benchmarkParsingParallelHelper(b *testing.B, q string) { |
| 30 | _ = schema.ParseBytes([]byte(sc), 1) |
| 31 | b.ResetTimer() |
| 32 | b.RunParallel(func(pb *testing.PB) { |
| 33 | for pb.Next() { |
| 34 | _, err := Parse(Request{Str: q}) |
| 35 | require.NoError(b, err) |
| 36 | } |
| 37 | }) |
| 38 | } |
| 39 | |
| 40 | func Benchmark_directors(b *testing.B) { benchmarkParsingHelper(b, q1) } |
| 41 | func Benchmark_Movies(b *testing.B) { benchmarkParsingHelper(b, q2) } |
no test coverage detected