API Usage

    • include_memtabtles - Indicates whether to count the memory usage of a given key range in memtables towards the overall size of the key range.
    • - Indicates whether to count the size of SST files occupied by the key range towards the overall size. Atleast one of this or include_memtabtles must be set to true.
    • files_size_error_margin - This option indicates the acceptable ratio of over/under estimation of file size to the actual file size. For example, a value of means the approximate size will be within 10% of the actual size of the key range. The main purpose of this option is to make the calculation more efficient. Setting this to -1.0 will force RocksDB to seek into SST files to accurately calculate the size, which will be more CPU intensive.Example,
    1. uint64_t count;
    2. uint64_t size;
    3.  
    4. range.limit = end_key;
    5.  
    6. Status s = GetApproximateMemTableStats(column_family, range, &count, &size);