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:
parent
bf9848c60f
commit
7a6bfa7e7a
12 changed files with 85 additions and 11 deletions
|
@ -38,7 +38,7 @@ class RocksDb : public KeyValue {
|
|||
public:
|
||||
static Status destroy(Slice path);
|
||||
RocksDb clone() const;
|
||||
static Result<RocksDb> open(std::string path);
|
||||
static Result<RocksDb> open(std::string path, std::shared_ptr<rocksdb::Statistics> statistics = nullptr);
|
||||
|
||||
Result<GetStatus> get(Slice key, std::string &value) override;
|
||||
Status set(Slice key, Slice value) override;
|
||||
|
@ -60,6 +60,10 @@ class RocksDb : public KeyValue {
|
|||
std::unique_ptr<KeyValueReader> snapshot() override;
|
||||
std::string stats() const override;
|
||||
|
||||
static std::shared_ptr<rocksdb::Statistics> create_statistics();
|
||||
static std::string statistics_to_string(const std::shared_ptr<rocksdb::Statistics> statistics);
|
||||
static void reset_statistics(const std::shared_ptr<rocksdb::Statistics> statistics);
|
||||
|
||||
RocksDb(RocksDb &&);
|
||||
RocksDb &operator=(RocksDb &&);
|
||||
~RocksDb();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue