Skip to content

Commit

Permalink
Enable compaction for rocksdb in benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
cberner committed Dec 30, 2024
1 parent 45621b6 commit 8d0859b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions benches/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,11 @@ impl<'a> BenchDatabase for RocksdbBenchDatabase<'a> {
let snapshot = self.db.snapshot();
RocksdbBenchReadTransaction { snapshot }
}

fn compact(&mut self) -> bool {
self.db.compact_range::<&[u8], &[u8]>(None, None);
true
}
}

pub struct RocksdbBenchWriteTransaction<'a> {
Expand Down

0 comments on commit 8d0859b

Please sign in to comment.