提交 3ff60317 编写于 作者: K Kirill Abrosimov 提交者: Facebook GitHub Bot

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
上级 fcd7bee9
...@@ -4441,6 +4441,16 @@ uint64_t rocksdb_approximate_memory_usage_get_cache_total( ...@@ -4441,6 +4441,16 @@ uint64_t rocksdb_approximate_memory_usage_get_cache_total(
return memory_usage->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 // deletes container with memory usage estimates
void rocksdb_approximate_memory_usage_destroy(rocksdb_memory_usage_t* usage) { void rocksdb_approximate_memory_usage_destroy(rocksdb_memory_usage_t* usage) {
delete usage; delete usage;
......
...@@ -1796,6 +1796,13 @@ extern ROCKSDB_LIBRARY_API uint64_t ...@@ -1796,6 +1796,13 @@ extern ROCKSDB_LIBRARY_API uint64_t
rocksdb_approximate_memory_usage_get_cache_total( rocksdb_approximate_memory_usage_get_cache_total(
rocksdb_memory_usage_t* memory_usage); 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 #ifdef __cplusplus
} /* end extern "C" */ } /* end extern "C" */
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册