MCPcopy
hub / github.com/dgraph-io/dgraph / benchmarkParsingParallelHelper

Function benchmarkParsingParallelHelper

dql/bench_test.go:29–38  ·  view source on GitHub ↗
(b *testing.B, q string)

Source from the content-addressed store, hash-verified

27}
28
29func 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
40func Benchmark_directors(b *testing.B) { benchmarkParsingHelper(b, q1) }
41func Benchmark_Movies(b *testing.B) { benchmarkParsingHelper(b, q2) }

Callers 7

Benchmark_ge_parallelFunction · 0.85
Benchmark_Date_parallelFunction · 0.85

Calls 3

ParseBytesFunction · 0.92
ParseFunction · 0.70
NextMethod · 0.45

Tested by

no test coverage detected