MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / BenchmarkUidPack

Function BenchmarkUidPack

codec/codec_test.go:272–285  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

270}
271
272func BenchmarkUidPack(b *testing.B) {
273 b.Run("encode/128", func(b *testing.B) {
274 benchmarkUidPackEncode(b, 128)
275 })
276 b.Run("encode/256", func(b *testing.B) {
277 benchmarkUidPackEncode(b, 256)
278 })
279 b.Run("decode/128", func(b *testing.B) {
280 benchmarkUidPackDecode(b, 128)
281 })
282 b.Run("decode/256", func(b *testing.B) {
283 benchmarkUidPackDecode(b, 256)
284 })
285}
286
287func benchmarkUidPackDecode(b *testing.B, blockSize int) {
288 uids := getUids(1e6)

Callers

nothing calls this directly

Calls 3

benchmarkUidPackEncodeFunction · 0.85
benchmarkUidPackDecodeFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected