0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-15 09:31:46 +02:00

modules/console: Add key count to db info summary.

This commit is contained in:
Jason Volk 2020-09-20 13:50:56 -07:00
parent 7b238fe15d
commit c197b0109b

View file

@ -5456,7 +5456,13 @@ try
}
else
{
out << std::endl;
out
<< std::endl
<< std::left << std::setfill (' ') << std::setw(3) << "ID"
<< " " << std::setw(20) << "NAME"
<< " " << std::right << std::setw(12) << "KEYS"
<< " " << std::left << std::setw(24) << "SIZE (COMPRESSED)"
<< " :" << "DESCRIPTION" << std::endl;
for(const auto &column : d.columns)
{
const auto explain
@ -5464,9 +5470,15 @@ try
split(db::describe(*column).explain, '\n').first
};
const auto &num_keys
{
db::property<db::prop_int>(*column, "rocksdb.estimate-num-keys")
};
out << std::left << std::setfill (' ') << std::setw(3) << db::id(*column)
<< " " << std::setw(20) << db::name(*column)
<< " " << std::setw(24) << pretty(iec(db::bytes(*column)))
<< " " << std::right << std::setw(12) << num_keys
<< " " << std::left << std::setw(24) << pretty(iec(db::bytes(*column)))
<< " :" << explain << std::endl;
}
}