Add the size of json cache to the data reported by ovsdb-server appctl
"memory/show" command.
Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
void
ovsdb_monitor_get_memory_usage(struct simap *usage)
{
+ struct ovsdb_monitor *dbmon;
simap_put(usage, "monitors", hmap_count(&ovsdb_monitors));
+
+ HMAP_FOR_EACH(dbmon, hmap_node, &ovsdb_monitors) {
+ simap_increase(usage, "json-caches", hmap_count(&dbmon->json_cache));
+ }
}
static const struct ovsdb_replica_class ovsdb_jsonrpc_replica_class = {