Closed karalabe closed 1 year ago
Merging #16 (9cbb28c) into main (4c8dcfa) will increase coverage by
0.09%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #16 +/- ##
==========================================
+ Coverage 89.87% 89.96% +0.09%
==========================================
Files 2 2
Lines 316 319 +3
==========================================
+ Hits 284 287 +3
Misses 17 17
Partials 15 15
This PR adds a new method to a billy.Database (
Size
) to retrieve the slot size belonging to an entry.The purpose is if we want to evict multiple smaller items in favor of a larger one in a calling application, then we need to know how many(and which ones) to evict after inserting a new item. Without this method, the calling app would need to replicate shelf size tracking and other billy internals. With this method we can just maintain the size of items in the memory index and pick and chose from there without caring how they are managed by billy.