Skip to content

Commit 555d966

Browse files
committed
kvs: add pending requests to module stats
Problem: There is no way to know how many pending requests are currently being handled by the KVS. Add this statistic to the module stats.
1 parent 5566a59 commit 555d966

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/modules/kvs/kvs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2313,9 +2313,10 @@ static void stats_get_cb (flux_t *h, flux_msg_handler_t *mh,
23132313
}
23142314

23152315
if (flux_respond_pack (h, msg,
2316-
"{ s:O s:O }",
2316+
"{ s:O s:O s:i }",
23172317
"cache", cstats,
2318-
"namespace", nsstats) < 0)
2318+
"namespace", nsstats,
2319+
"pending_requests", zhashx_size (ctx->requests)) < 0)
23192320
flux_log_error (h, "%s: flux_respond_pack", __FUNCTION__);
23202321
json_decref (tstats);
23212322
json_decref (cstats);

0 commit comments

Comments
 (0)