Skip to content

Commit

Permalink
fix: remove db after benchmark
Browse files Browse the repository at this point in the history
Signed-off-by: rfyiamcool <[email protected]>
  • Loading branch information
rfyiamcool committed Aug 14, 2023
1 parent 1bafd6b commit bf1a4f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion benchmark/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func BenchmarkPut(b *testing.B) {
b.ResetTimer()
b.ReportAllocs()

value := []byte(strings.Repeat("d", 16))
for i := 0; i < b.N; i++ {
err := db.Put(GetTestKey(i), []byte(strings.Repeat("d", 16)), func(slot diskhash.Slot) (bool, error) {
err := db.Put(GetTestKey(i), value, func(slot diskhash.Slot) (bool, error) {
return false, nil
})
assert.Nil(b, err)
Expand Down

0 comments on commit bf1a4f6

Please sign in to comment.