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

Function BenchmarkFastJsonNodeEmpty

query/outputnode_test.go:169–178  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

167}
168
169func BenchmarkFastJsonNodeEmpty(b *testing.B) {
170 for i := 0; i < b.N; i++ {
171 enc := newEncoder()
172 var fj fastJsonNode
173 for range 2000000 {
174 fj = enc.newNode(0)
175 }
176 _ = fj
177 }
178}
179
180var (
181 testAttr = "abcdefghijklmnop"

Callers

nothing calls this directly

Calls 2

newEncoderFunction · 0.85
newNodeMethod · 0.80

Tested by

no test coverage detected