mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
modules/console: Omit zero values in db infos.
This commit is contained in:
parent
c9e9fd3621
commit
7f7ece5fb1
1 changed files with 18 additions and 10 deletions
|
@ -3216,12 +3216,16 @@ try
|
|||
(const string_view &prop)
|
||||
{
|
||||
const auto name(lstrip(prop, "rocksdb."));
|
||||
closeout(name, [&out, &d, &c, &prop]
|
||||
const auto val
|
||||
{
|
||||
if(c)
|
||||
out << db::property(c, prop);
|
||||
else
|
||||
out << db::property(d, prop);
|
||||
c?
|
||||
db::property<db::prop_int>(c, prop):
|
||||
db::property<db::prop_int>(d, prop)
|
||||
};
|
||||
|
||||
if(!!val) closeout(name, [&out, &val]
|
||||
{
|
||||
out << val;
|
||||
});
|
||||
}};
|
||||
|
||||
|
@ -3229,12 +3233,16 @@ try
|
|||
(const string_view &prop)
|
||||
{
|
||||
const auto name(lstrip(prop, "rocksdb."));
|
||||
closeout(name, [&out, &d, &c, &prop]
|
||||
const auto val
|
||||
{
|
||||
if(c)
|
||||
out << pretty(iec(db::property<db::prop_int>(c, prop)));
|
||||
else
|
||||
out << pretty(iec(db::property(d, prop)));
|
||||
c?
|
||||
db::property<db::prop_int>(c, prop):
|
||||
db::property<db::prop_int>(d, prop)
|
||||
};
|
||||
|
||||
if(!!val) closeout(name, [&out, &val]
|
||||
{
|
||||
out << pretty(iec(val));
|
||||
});
|
||||
}};
|
||||
|
||||
|
|
Loading…
Reference in a new issue