MINOR: activity: group the per-loop counters at the top

empty_rq and long_rq are per-loop so it makes sense to group them
together with the loop count. In addition since ctxsw and tasksw
apply in the context of these counters, let's move them as well.
More precisely the difference between wake_tasks and long_rq should
roughly correspond to the number of inter-task messages. Visually
it's much easier to spot ratios of wakeup causes now.
This commit is contained in:
Willy Tarreau 2020-06-17 20:44:28 +02:00
parent ddc874c46c
commit a00cf9bbaf

View File

@ -1126,6 +1126,10 @@ static int cli_io_handler_show_activity(struct appctx *appctx)
chunk_appendf(&trash, "thread_id: %u (%u..%u)\n", tid + 1, 1, global.nbthread);
chunk_appendf(&trash, "date_now: %lu.%06lu\n", (long)now.tv_sec, (long)now.tv_usec);
chunk_appendf(&trash, "ctxsw:"); SHOW_TOT(thr, activity[thr].ctxsw);
chunk_appendf(&trash, "tasksw:"); SHOW_TOT(thr, activity[thr].tasksw);
chunk_appendf(&trash, "empty_rq:"); SHOW_TOT(thr, activity[thr].empty_rq);
chunk_appendf(&trash, "long_rq:"); SHOW_TOT(thr, activity[thr].long_rq);
chunk_appendf(&trash, "loops:"); SHOW_TOT(thr, activity[thr].loops);
chunk_appendf(&trash, "wake_tasks:"); SHOW_TOT(thr, activity[thr].wake_tasks);
chunk_appendf(&trash, "wake_signal:"); SHOW_TOT(thr, activity[thr].wake_signal);
@ -1138,10 +1142,6 @@ static int cli_io_handler_show_activity(struct appctx *appctx)
chunk_appendf(&trash, "stream:"); SHOW_TOT(thr, activity[thr].stream);
chunk_appendf(&trash, "pool_fail:"); SHOW_TOT(thr, activity[thr].pool_fail);
chunk_appendf(&trash, "buf_wait:"); SHOW_TOT(thr, activity[thr].buf_wait);
chunk_appendf(&trash, "empty_rq:"); SHOW_TOT(thr, activity[thr].empty_rq);
chunk_appendf(&trash, "long_rq:"); SHOW_TOT(thr, activity[thr].long_rq);
chunk_appendf(&trash, "ctxsw:"); SHOW_TOT(thr, activity[thr].ctxsw);
chunk_appendf(&trash, "tasksw:"); SHOW_TOT(thr, activity[thr].tasksw);
chunk_appendf(&trash, "cpust_ms_tot:"); SHOW_TOT(thr, activity[thr].cpust_total / 2);
chunk_appendf(&trash, "cpust_ms_1s:"); SHOW_TOT(thr, read_freq_ctr(&activity[thr].cpust_1s) / 2);
chunk_appendf(&trash, "cpust_ms_15s:"); SHOW_TOT(thr, read_freq_ctr_period(&activity[thr].cpust_15s, 15000) / 2);