Skip to content

Commit

Permalink
fix not accumulating used bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek-sha committed Aug 19, 2024
1 parent 9575cbb commit 838f050
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ impl CandyStore {
for (_, shard) in guard.iter() {
stats.num_inserted += shard.header.num_inserted.load(Ordering::Relaxed) as usize;
stats.num_removed += shard.header.num_removed.load(Ordering::Relaxed) as usize;
stats.used_bytes = shard.header.write_offset.load(Ordering::Relaxed) as usize;
stats.used_bytes += shard.header.write_offset.load(Ordering::Relaxed) as usize;
stats.wasted_bytes += shard.header.wasted_bytes.load(Ordering::Relaxed) as usize;
}
stats
Expand Down

0 comments on commit 838f050

Please sign in to comment.