Skip to content

Commit

Permalink
simple memory printing speedb db bench
Browse files Browse the repository at this point in the history
  • Loading branch information
Or Friedmann committed Aug 1, 2023
1 parent ba1ce97 commit 7876a33
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/db_bench_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2156,6 +2156,17 @@ struct DBWithColumnFamilies {
}

void DeleteDBs() {
std::string out;
std::cout << "\n\n\n\nMemory Usage stats: \n" << std::endl;
db->GetProperty("rocksdb.block-cache-usage", &out);
std::cout << "rocksdb.block-cache-usage " << out << std::endl;
db->GetProperty("rocksdb.estimate-table-readers-mem", &out);
std::cout << "rocksdb.estimate-table-readers-mem " << out << std::endl;
db->GetProperty("rocksdb.cur-size-all-mem-tables", &out);
std::cout << "rocksdb.cur-size-all-mem-tables " << out << std::endl;
db->GetProperty("rocksdb.block-cache-pinned-usage", &out);
std::cout << "rocksdb.block-cache-pinned-usage " << out << std::endl;
std::cout << "=============================================" << std::endl;
std::for_each(cfh.begin(), cfh.end(),
[](ColumnFamilyHandle* cfhi) { delete cfhi; });
cfh.clear();
Expand Down

0 comments on commit 7876a33

Please sign in to comment.