cosmos-sdk/store/internal/maps/bench_test.go
Alexander Bezobchuk 0f44d1af23
store: Remove Amino (#6984)
* Update kv pair to proto

* updates

* fix LastCommitID

* lint++

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-11 10:09:16 +00:00

14 lines
236 B
Go

package maps
import "testing"
func BenchmarkKVPairBytes(b *testing.B) {
kvp := NewKVPair(make([]byte, 128), make([]byte, 1e6))
b.ResetTimer()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
b.SetBytes(int64(len(kvp.Bytes())))
}
}