0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-16 15:00:51 +01:00

modules/console: Hide db tickers of zero unless -a; tweak db base cmd output.

This commit is contained in:
Jason Volk 2018-05-23 04:16:30 -07:00
parent ac4e6b23f4
commit 08d8ea02b8

View file

@ -1093,7 +1093,7 @@ try
}; };
// Special branch for integer properties that RocksDB aggregates. // Special branch for integer properties that RocksDB aggregates.
if(!empty(ticker)) if(ticker && ticker != "-a")
{ {
out << ticker << ": " << db::ticker(database, ticker) << std::endl; out << ticker << ": " << db::ticker(database, ticker) << std::endl;
return true; return true;
@ -1109,8 +1109,16 @@ try
if(!name) if(!name)
continue; continue;
out << std::setw(48) << std::right << name const auto &val
<< " " << db::ticker(database, i) {
db::ticker(database, i)
};
if(val == 0 && ticker != "-a")
continue;
out << std::left << std::setw(48) << std::setfill('_') << name
<< " " << val
<< std::endl; << std::endl;
} }
@ -1737,6 +1745,10 @@ try
<< " " << uuid(database) << " " << uuid(database)
<< std::endl; << 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 " out << std::left << std::setw(28) << std::setfill('_') << "columns "
<< " " << database.columns.size() << " " << database.columns.size()
<< std::endl; << std::endl;
@ -1745,6 +1757,10 @@ try
<< " " << file_count(database) << " " << file_count(database)
<< std::endl; << std::endl;
out << std::left << std::setw(28) << std::setfill('_') << "sequence "
<< " " << sequence(database)
<< std::endl;
out << std::left << std::setw(28) << std::setfill('_') << "keys " out << std::left << std::setw(28) << std::setfill('_') << "keys "
<< " " << db::property(database, "rocksdb.estimate-num-keys") << " " << db::property(database, "rocksdb.estimate-num-keys")
<< std::endl; << std::endl;
@ -1777,18 +1793,10 @@ try
<< " " << db::property(database, "rocksdb.num-deletes-active-mem-table") << " " << db::property(database, "rocksdb.num-deletes-active-mem-table")
<< std::endl; << 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") << " " << db::property(database, "rocksdb.current-super-version-number")
<< std::endl; << 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; return true;
} }
catch(const std::out_of_range &e) catch(const std::out_of_range &e)