mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
ircd:🆑 Add work_completes accumulator to stats.
This commit is contained in:
parent
24b6ee8f57
commit
b0c9c9f8b2
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue