MCPcopy Index your code
hub / github.com/pingcap/tidb / BenchmarkDecodeIndexKeyIntHandle

Function BenchmarkDecodeIndexKeyIntHandle

pkg/tablecodec/bench_test.go:61–69  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

59}
60
61func BenchmarkDecodeIndexKeyIntHandle(b *testing.B) {
62 var idxVal []byte
63 // When handle values greater than 255, it will have a memory alloc.
64 idxVal = append(idxVal, EncodeHandleInUniqueIndexValue(kv.IntHandle(256), false)...)
65
66 for i := 0; i < b.N; i++ {
67 DecodeHandleInIndexValue(idxVal)
68 }
69}
70
71func BenchmarkDecodeIndexKeyCommonHandle(b *testing.B) {
72 var idxVal []byte

Callers

nothing calls this directly

Calls 3

IntHandleTypeAlias · 0.92
DecodeHandleInIndexValueFunction · 0.85

Tested by

no test coverage detected