added new functions to c-api (#5630)

Summary:
Few functions from options added to C-api
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5630

Reviewed By: anand1976

Differential Revision: D20896731

Pulled By: ltamasi

fbshipit-source-id: e4215a58b3c2429ec44e3f0d0381cbf86700fb14
This commit is contained in:
Kirill Abrosimov 2020-04-07 14:43:23 -07:00 committed by Facebook GitHub Bot
parent fcd7bee925
commit 3ff603171d
2 changed files with 17 additions and 0 deletions

10
db/c.cc
View File

@ -4441,6 +4441,16 @@ uint64_t rocksdb_approximate_memory_usage_get_cache_total(
return memory_usage->cache_total;
}
void rocksdb_options_set_dump_malloc_stats(rocksdb_options_t* opt,
unsigned char val) {
opt->rep.dump_malloc_stats = val;
}
void rocksdb_options_set_memtable_whole_key_filtering(rocksdb_options_t* opt,
unsigned char val) {
opt->rep.memtable_whole_key_filtering = val;
}
// deletes container with memory usage estimates
void rocksdb_approximate_memory_usage_destroy(rocksdb_memory_usage_t* usage) {
delete usage;

View File

@ -1796,6 +1796,13 @@ extern ROCKSDB_LIBRARY_API uint64_t
rocksdb_approximate_memory_usage_get_cache_total(
rocksdb_memory_usage_t* memory_usage);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_dump_malloc_stats(
rocksdb_options_t*, unsigned char);
extern ROCKSDB_LIBRARY_API void
rocksdb_options_set_memtable_whole_key_filtering(rocksdb_options_t*,
unsigned char);
#ifdef __cplusplus
} /* end extern "C" */
#endif