mirror of
https://github.com/matrix-construct/construct
synced 2024-11-30 02:32:43 +01:00
modules/console: Show number of keys in event_horizon when no event_id given.
This commit is contained in:
parent
20d3fe1072
commit
ff61342c01
1 changed files with 13 additions and 2 deletions
|
@ -6438,11 +6438,22 @@ console_cmd__event__horizon(opt &out, const string_view &line)
|
||||||
"event_id",
|
"event_id",
|
||||||
}};
|
}};
|
||||||
|
|
||||||
const m::event::id &event_id
|
const string_view &event_id
|
||||||
{
|
{
|
||||||
param.at("event_id")
|
param["event_id"]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(!event_id)
|
||||||
|
{
|
||||||
|
const auto &num_keys
|
||||||
|
{
|
||||||
|
db::property<db::prop_int>(m::dbs::event_horizon, "rocksdb.estimate-num-keys")
|
||||||
|
};
|
||||||
|
|
||||||
|
out << "Estimated event_id's unresolved: " << num_keys << '.' << std::endl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
char buf[m::dbs::EVENT_HORIZON_KEY_MAX_SIZE];
|
char buf[m::dbs::EVENT_HORIZON_KEY_MAX_SIZE];
|
||||||
const string_view &key
|
const string_view &key
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue