benchmarks: set test size to compute throughput (#16)

* benchmarks: set test size to compute throughput

* patch: error on cross-filesystem rename operation

* revert: commit to wrong branch
This commit is contained in:
Awn 2019-07-24 22:14:58 +01:00 committed by James Mills
parent fd2023ee38
commit 3b63388e79

@ -528,6 +528,8 @@ func BenchmarkGet(b *testing.B) {
for _, tt := range tests {
b.Run(tt.name, func(b *testing.B) {
b.SetBytes(int64(tt.size))
key := "foo"
value := []byte(strings.Repeat(" ", tt.size))
@ -576,6 +578,8 @@ func BenchmarkPut(b *testing.B) {
for _, tt := range tests {
b.Run(tt.name, func(b *testing.B) {
b.SetBytes(int64(tt.size))
key := "foo"
value := []byte(strings.Repeat(" ", tt.size))
b.ResetTimer()