prysm-pulse/beacon-chain/p2p/peers/benchmark_test.go
terence tsao d5ec248691
Rename getter functions to be idiomatic (#8320)
* Rename getter functions

* Rename new

* Radek's feedback

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-25 21:27:30 +00:00

19 lines
313 B
Go

package peers
import (
"testing"
"github.com/prysmaticlabs/go-bitfield"
)
func Benchmark_retrieveIndicesFromBitfield(b *testing.B) {
bv := bitfield.NewBitvector64()
for i := uint64(0); i < bv.Len(); i++ {
bv.SetBitAt(i, true)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
indicesFromBitfield(bv)
}
}