From b0c9c9f8b2bc7fdf4cfe32e280a59a26ab257422 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 5 Mar 2022 12:30:51 -0800 Subject: [PATCH] ircd::cl: Add work_completes accumulator to stats. --- ircd/cl.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ircd/cl.cc b/ircd/cl.cc index 0a88b0cb6..cca1aa4b3 100644 --- a/ircd/cl.cc +++ b/ircd/cl.cc @@ -82,6 +82,7 @@ struct ircd::cl::stats work_waits, work_waits_async, work_errors, + work_completes, exec_tasks, exec_kern_tasks, exec_kern_threads, @@ -195,6 +196,7 @@ ircd::cl::primary_stats { { "name", "ircd.cl.work.waits" } }, { { "name", "ircd.cl.work.waits.async" } }, { { "name", "ircd.cl.work.errors" } }, + { { "name", "ircd.cl.work.completes" } }, { { "name", "ircd.cl.exec.tasks" } }, { { "name", "ircd.cl.exec.kern.tasks" } }, { { "name", "ircd.cl.exec.kern.threads" } }, @@ -2532,6 +2534,12 @@ ircd::cl::wait_event(work &work, ret < 0 }; + const bool is_complete + { + ret == CL_COMPLETE + }; + + primary_stats.work_completes += is_complete; primary_stats.work_errors += is_err; primary_stats.work_waits += 1; return ret;