Allows to collect RocksDB statistics

Hidden behind the "rocksdb_debug" features
pull/470/head
Tpt 1 year ago committed by Thomas Tanon
parent d74fc58a1c
commit a977adff91
  1. 1
      lib/Cargo.toml
  2. 6
      lib/src/storage/backend/rocksdb.rs

@ -20,6 +20,7 @@ all-features = true
[features]
default = []
http_client = ["oxhttp", "oxhttp/rustls"]
rocksdb_debug = []
[dependencies]
rand = "0.8"

@ -212,6 +212,12 @@ impl Db {
16,
);
rocksdb_options_set_block_based_table_factory(options, block_based_table_options);
#[cfg(feature = "rocksdb_debug")]
{
rocksdb_options_set_info_log_level(options, 0);
rocksdb_options_enable_statistics(options);
rocksdb_options_set_stats_dump_period_sec(options, 60);
}
let (column_family_names, c_column_family_names, cf_options) =
Self::column_families_names_and_options(column_families, options);

Loading…
Cancel
Save