mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 23:10:54 +01:00
modules/console: Improve db base cmd output.
This commit is contained in:
parent
9f5e79aa00
commit
61630ea308
1 changed files with 39 additions and 14 deletions
|
@ -1515,7 +1515,7 @@ try
|
||||||
|
|
||||||
const params param{line, " ",
|
const params param{line, " ",
|
||||||
{
|
{
|
||||||
"dbname", "column"
|
"dbname"
|
||||||
}};
|
}};
|
||||||
|
|
||||||
auto &database
|
auto &database
|
||||||
|
@ -1523,27 +1523,52 @@ try
|
||||||
*db::database::dbs.at(param.at(0))
|
*db::database::dbs.at(param.at(0))
|
||||||
};
|
};
|
||||||
|
|
||||||
out << "sequence : " << sequence(database) << std::endl;
|
out << std::left << std::setw(28) << std::setfill('_') << "columns "
|
||||||
out << "database size: : " << bytes(database) << std::endl;
|
<< " " << database.columns.size()
|
||||||
|
|
||||||
out << "database keys (est) : "
|
|
||||||
<< db::property(database, "rocksdb.estimate-num-keys")
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
out << "all tables size : "
|
out << std::left << std::setw(28) << std::setfill('_') << "files "
|
||||||
<< db::property(database, "rocksdb.size-all-mem-tables")
|
<< " " << file_count(database)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
out << "active table size : "
|
out << std::left << std::setw(28) << std::setfill('_') << "keys "
|
||||||
<< db::property(database, "rocksdb.cur-size-active-mem-table")
|
<< " " << db::property(database, "rocksdb.estimate-num-keys")
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
out << "active table entries : "
|
out << std::left << std::setw(28) << std::setfill('_') << "size "
|
||||||
<< db::property(database, "rocksdb.num-entries-active-mem-table")
|
<< " " << bytes(database)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
out << "active table deletes : "
|
out << std::left << std::setw(28) << std::setfill('_') << "live data size "
|
||||||
<< db::property(database, "rocksdb.num-deletes-active-mem-table")
|
<< " " << db::property(database, "rocksdb.estimate-live-data-size")
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
out << std::left << std::setw(28) << std::setfill('_') << "all tables size "
|
||||||
|
<< " " << db::property(database, "rocksdb.size-all-mem-tables")
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
out << std::left << std::setw(28) << std::setfill('_') << "active table size "
|
||||||
|
<< " " << db::property(database, "rocksdb.cur-size-active-mem-table")
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
out << std::left << std::setw(28) << std::setfill('_') << "active table entries "
|
||||||
|
<< " " << db::property(database, "rocksdb.num-entries-active-mem-table")
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
out << std::left << std::setw(28) << std::setfill('_') << "active table deletes "
|
||||||
|
<< " " << db::property(database, "rocksdb.num-deletes-active-mem-table")
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
out << std::left << std::setw(28) << std::setfill('_') << "lsm super sequence "
|
||||||
|
<< " " << db::property(database, "rocksdb.current-super-version-number")
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
out << std::left << std::setw(28) << std::setfill('_') << "sequence "
|
||||||
|
<< " " << sequence(database)
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
out << std::left << std::setw(28) << std::setfill('_') << "errors "
|
||||||
|
<< " " << db::property(database, "rocksdb.background-errors")
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue