MCPcopy
hub / github.com/openacid/slim / BenchmarkBaseGetBytes

Function BenchmarkBaseGetBytes

array/base_test.go:296–312  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

294}
295
296func BenchmarkBaseGetBytes(b *testing.B) {
297
298 indexes := []int32{1, 3, 100}
299 elts := []uint16{1, 3, 100}
300
301 ab := &array.Base{}
302 err := ab.Init(indexes, elts)
303 if err != nil {
304 panic(err)
305 }
306
307 b.ResetTimer()
308
309 for i := 0; i < b.N; i++ {
310 ab.GetBytes(1, 2)
311 }
312}

Callers

nothing calls this directly

Calls 2

InitMethod · 0.95
GetBytesMethod · 0.95

Tested by

no test coverage detected