Skip to content

Commit 66b64a9

Browse files
committed
space of cleanup sketch
1 parent cda3c1d commit 66b64a9

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

include/recovery.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,16 @@ class SparseRecovery {
7777
}
7878

7979
public:
80-
size_t space_usage_bytes(bool include_cleanup_sketch) const {
80+
size_t space_usage_bytes() const {
81+
size_t total = sizeof(SparseRecovery);
82+
total += recovery_buckets.capacity() * sizeof(Bucket);
83+
total += sizeof(Sketch);
84+
total += cleanup_sketch->bucket_array_bytes();
85+
return total;
86+
}
87+
size_t space_usage_bytes_nocleanup() const {
8188
size_t total = sizeof(SparseRecovery);
8289
total += recovery_buckets.capacity() * sizeof(Bucket);
83-
if (include_cleanup_sketch) {
84-
total += sizeof(Sketch);
85-
total += cleanup_sketch->bucket_array_bytes();
86-
}
8790
return total;
8891
}
8992
inline uint64_t get_seed() const { return seed; }

0 commit comments

Comments
 (0)