arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce
sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r374684866
##########
File path: extensions/rocksdb-repos/FlowFileRepository.cpp
##########
@@ -97,23 +91,33 @@ void FlowFileRepository::flush() {
}
}
-void FlowFileRepository::run() {
- // threshold for purge
+void FlowFileRepository::printStats() {
+ std::string key_count;
+ db_->GetProperty("rocksdb.estimate-num-keys", &key_count);
+
+ std::string table_readers;
+ db_->GetProperty("rocksdb.estimate-table-readers-mem", &table_readers);
+
+ std::string all_memtables;
+ db_->GetProperty("rocksdb.cur-size-all-mem-tables", &all_memtables);
+
+ logger_->log_info("Repository stats: key count: %zu, table readers size:
%zu, all memory tables size: %zu",
+ key_count, table_readers, all_memtables);
+}
+void FlowFileRepository::run() {
+ auto last = std::chrono::system_clock::now();
Review comment:
Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services