Added an info handler which required updating Cargo.toml to include valkey-module-macros and linkme. The info handler contains two fields bloom_total_memory_bytes and bloom_num_objects. I then updated the creation and copy methods of bloom objects to increment these values where necessary. In order to deincrement added impl Drop for bloom in order to decrease the info fields as necessary.
Testing:
Created a new test file specifically for info. This test file contains for different tests:
test_basic_command_metrics: This tests all create commands and non create commands to check that create commands increase the info metrics while non create dont have an influence.
test_scaled_bloomfilter_metrics: Tests scaling a bloom filter increases the metrics as desired
test_copy_metrics: Tests copying a bloom filter will double the metrics as desired
test_save_and_restore_metrics: Tests saving and restoring a scaled and non scaled bloom filter will increase metrics as desired
Added an info handler which required updating Cargo.toml to include valkey-module-macros and linkme. The info handler contains two fields bloom_total_memory_bytes and bloom_num_objects. I then updated the creation and copy methods of bloom objects to increment these values where necessary. In order to deincrement added impl Drop for bloom in order to decrease the info fields as necessary.
Testing: Created a new test file specifically for info. This test file contains for different tests: test_basic_command_metrics: This tests all create commands and non create commands to check that create commands increase the info metrics while non create dont have an influence. test_scaled_bloomfilter_metrics: Tests scaling a bloom filter increases the metrics as desired test_copy_metrics: Tests copying a bloom filter will double the metrics as desired test_save_and_restore_metrics: Tests saving and restoring a scaled and non scaled bloom filter will increase metrics as desired