MCPcopy Create free account
hub / github.com/elliotchance/orderedmap / benchmarkOrderedMap_Get

Function benchmarkOrderedMap_Get

orderedmap_test.go:423–434  ·  view source on GitHub ↗
(multiplier int)

Source from the content-addressed store, hash-verified

421}
422
423func benchmarkOrderedMap_Get(multiplier int) func(b *testing.B) {
424 m := orderedmap.NewOrderedMap()
425 for i := 0; i < 1000*multiplier; i++ {
426 m.Set(i, true)
427 }
428
429 return func(b *testing.B) {
430 for i := 0; i < b.N; i++ {
431 m.Get(i % 1000 * multiplier)
432 }
433 }
434}
435
436func BenchmarkOrderedMap_Get(b *testing.B) {
437 benchmarkOrderedMap_Get(1)(b)

Callers 2

TestGetFunction · 0.70
BenchmarkOrderedMap_GetFunction · 0.70

Calls 3

SetMethod · 0.95
GetMethod · 0.95
NewOrderedMapFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…