diff --git a/modules/console.cc b/modules/console.cc index 308d74f56..519b5e40f 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -6710,6 +6710,40 @@ console_cmd__events__type(opt &out, const string_view &line) return true; } +bool +console_cmd__events__type__counts(opt &out, const string_view &line) +{ + const params param{line, " ", + { + "prefix" + }}; + + const string_view &prefix + { + param["prefix"] + }; + + m::events::type::for_each(prefix, [&out] + (const string_view &type) + { + size_t i(0); + m::events::type::for_each_in(type, [&i] + (const string_view &type, const m::event::idx &event_idx) + { + ++i; + return true; + }); + + out + << std::setw(8) << std::right << i + << " " << type + << std::endl; + return true; + }); + + return true; +} + bool console_cmd__events__sender(opt &out, const string_view &line) {