mirror of
https://github.com/matrix-construct/construct
synced 2024-09-28 19:58:53 +02:00
modules/console: Hide db tickers of zero unless -a; tweak db base cmd output.
This commit is contained in:
parent
ac4e6b23f4
commit
08d8ea02b8
1 changed files with 20 additions and 12 deletions
|
@ -1093,7 +1093,7 @@ try
|
|||
};
|
||||
|
||||
// Special branch for integer properties that RocksDB aggregates.
|
||||
if(!empty(ticker))
|
||||
if(ticker && ticker != "-a")
|
||||
{
|
||||
out << ticker << ": " << db::ticker(database, ticker) << std::endl;
|
||||
return true;
|
||||
|
@ -1109,8 +1109,16 @@ try
|
|||
if(!name)
|
||||
continue;
|
||||
|
||||
out << std::setw(48) << std::right << name
|
||||
<< " " << db::ticker(database, i)
|
||||
const auto &val
|
||||
{
|
||||
db::ticker(database, i)
|
||||
};
|
||||
|
||||
if(val == 0 && ticker != "-a")
|
||||
continue;
|
||||
|
||||
out << std::left << std::setw(48) << std::setfill('_') << name
|
||||
<< " " << val
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
|
@ -1737,6 +1745,10 @@ try
|
|||
<< " " << uuid(database)
|
||||
<< std::endl;
|
||||
|
||||
out << std::left << std::setw(28) << std::setfill('_') << "errors "
|
||||
<< " " << db::property(database, "rocksdb.background-errors")
|
||||
<< std::endl;
|
||||
|
||||
out << std::left << std::setw(28) << std::setfill('_') << "columns "
|
||||
<< " " << database.columns.size()
|
||||
<< std::endl;
|
||||
|
@ -1745,6 +1757,10 @@ try
|
|||
<< " " << file_count(database)
|
||||
<< std::endl;
|
||||
|
||||
out << std::left << std::setw(28) << std::setfill('_') << "sequence "
|
||||
<< " " << sequence(database)
|
||||
<< std::endl;
|
||||
|
||||
out << std::left << std::setw(28) << std::setfill('_') << "keys "
|
||||
<< " " << db::property(database, "rocksdb.estimate-num-keys")
|
||||
<< std::endl;
|
||||
|
@ -1777,18 +1793,10 @@ try
|
|||
<< " " << db::property(database, "rocksdb.num-deletes-active-mem-table")
|
||||
<< std::endl;
|
||||
|
||||
out << std::left << std::setw(28) << std::setfill('_') << "lsm super sequence "
|
||||
out << std::left << std::setw(28) << std::setfill('_') << "lsm 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;
|
||||
|
||||
return true;
|
||||
}
|
||||
catch(const std::out_of_range &e)
|
||||
|
|
Loading…
Reference in a new issue