• M
    Stats for false positive rate of full filtesr · 67182678
    Maysam Yabandeh 提交于
    Summary:
    Adds two stats to allow us measuring the false positive rate of full filters:
    - The total count of positives: rocksdb.bloom.filter.full.positive
    - The total count of true positives: rocksdb.bloom.filter.full.true.positive
    Not the term "full" in the stat name to indicate that they are meaningful in full filters. block-based filters are to be deprecated soon and supporting it is not worth the the additional cost of if-then-else branches.
    
    Closes #3680
    
    Tested by:
    $ ./db_bench -benchmarks=fillrandom  -db /dev/shm/rocksdb-tmpdb --num=1000000 -bloom_bits=10
    $ ./db_bench -benchmarks="readwhilewriting"  -db /dev/shm/rocksdb-tmpdb --statistics -bloom_bits=10 --duration=60 --num=2000000 --use_existing_db 2>&1 > /tmp/full.log
    $ grep filter.full /tmp/full.log
    rocksdb.bloom.filter.full.positive COUNT : 3628593
    rocksdb.bloom.filter.full.true.positive COUNT : 3536026
    which gives the false positive rate of 2.5%
    Closes https://github.com/facebook/rocksdb/pull/3681
    
    Differential Revision: D7517570
    
    Pulled By: maysamyabandeh
    
    fbshipit-source-id: 630ab1a473afdce404916d297035b6318de4c052
    67182678
get_context.cc 8.3 KB