1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Save rocksdb statistics to file every minute (#932)

* Save rocksdb statistics to file every minute

* Add flag to disable collecting rocksdb statistics
This commit is contained in:
Marat 2024-03-20 12:21:40 +01:00 committed by GitHub
parent bf9848c60f
commit 7a6bfa7e7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 85 additions and 11 deletions

View file

@ -1367,6 +1367,7 @@ td::Status ValidatorEngine::load_global_config() {
validator_options_.write().set_celldb_compress_depth(celldb_compress_depth_);
validator_options_.write().set_max_open_archive_files(max_open_archive_files_);
validator_options_.write().set_archive_preload_period(archive_preload_period_);
validator_options_.write().set_disable_rocksdb_stats(disable_rocksdb_stats_);
std::vector<ton::BlockIdExt> h;
for (auto &x : conf.validator_->hardforks_) {
@ -3816,6 +3817,9 @@ int main(int argc, char *argv[]) {
p.add_option('\0', "enable-precompiled-smc",
"enable exectuion of precompiled contracts (experimental, disabled by default)",
[]() { block::precompiled::set_precompiled_execution_enabled(true); });
p.add_option('\0', "disable-rocksdb-stats", "disable gathering rocksdb statistics (enabled by default)", [&]() {
acts.push_back([&x]() { td::actor::send_closure(x, &ValidatorEngine::set_disable_rocksdb_stats, true); });
});
auto S = p.run(argc, argv);
if (S.is_error()) {
LOG(ERROR) << "failed to parse options: " << S.move_as_error();