danielealbano / cachegrand

cachegrand - a modern data ingestion, processing and serving platform built for today's hardware
BSD 3-Clause "New" or "Revised" License
975 stars 34 forks source link

Hashtable keep track of the keys count #187

Closed danielealbano closed 2 years ago

danielealbano commented 2 years ago

This PR implements a mechanism for the hashtable to keep track of various counters, this mechanism is currently used only to calculate the amount of keys in the hashtable and nothing else.

The newly implemented mechanism is required by the redis DBSIZE command

codecov[bot] commented 2 years ago

Codecov Report

Merging #187 (a78a6b2) into main (8a7f4ed) will decrease coverage by 0.14%. The diff coverage is 66.20%.

@@            Coverage Diff             @@
##             main     #187      +/-   ##
==========================================
- Coverage   79.41%   79.27%   -0.14%     
==========================================
  Files         105      106       +1     
  Lines        6795     6866      +71     
==========================================
+ Hits         5396     5443      +47     
- Misses       1399     1423      +24     
Impacted Files Coverage Δ
src/data_structures/hashtable/mcmp/hashtable.c 84.00% <ø> (ø)
src/storage/db/storage_db.c 58.69% <ø> (ø)
...uctures/hashtable/mcmp/hashtable_thread_counters.c 61.90% <61.90%> (ø)
...rc/data_structures/hashtable/mcmp/hashtable_data.c 81.82% <100.00%> (+0.69%) :arrow_up:
...ta_structures/hashtable/mcmp/hashtable_op_delete.c 100.00% <100.00%> (ø)
.../data_structures/hashtable/mcmp/hashtable_op_rmw.c 98.28% <100.00%> (+0.13%) :arrow_up:
.../data_structures/hashtable/mcmp/hashtable_op_set.c 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.