Skip to content

Commit

Permalink
storage: stop using a Distinct on top of a WriteOnly batch in gc benc…
Browse files Browse the repository at this point in the history
…hmark

We don't use this in the real code, why use it in the benchmark?

Release note: None
  • Loading branch information
ajwerner committed Jul 15, 2020
1 parent 924c4e1 commit 989525a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/storage/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1009,12 +1009,10 @@ func runMVCCGarbageCollect(

b.ResetTimer()
for i := 0; i < b.N; i++ {
batch := eng.NewWriteOnlyBatch()
distinct := batch.Distinct()
if err := MVCCGarbageCollect(ctx, distinct, nil /* ms */, gcKeys, now); err != nil {
batch := eng.NewBatch()
if err := MVCCGarbageCollect(ctx, batch, nil /* ms */, gcKeys, now); err != nil {
b.Fatal(err)
}
distinct.Close()
batch.Close()
}
}
Expand Down

0 comments on commit 989525a

Please sign in to comment.