From 34b1facbcf0e7abbf3c58709d1a9cbe4ac608519 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 31 May 2018 14:40:19 +0200 Subject: [PATCH] MINOR: stats: also report the nice and number of calls for applets Since applets are now part of the main scheduler, it's useful to report their nice value and the number of calls to the applet handler, to see where the CPU is spent. --- src/stream.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/stream.c b/src/stream.c index 7ad84e993..9fdf6621b 100644 --- a/src/stream.c +++ b/src/stream.c @@ -2911,13 +2911,14 @@ static int stats_dump_full_strm_to_buffer(struct stream_interface *si, struct st } else if ((tmpctx = objt_appctx(strm->si[0].end)) != NULL) { chunk_appendf(&trash, - " app0=%p st0=%d st1=%d st2=%d applet=%s tmask=0x%lx\n", + " app0=%p st0=%d st1=%d st2=%d applet=%s tmask=0x%lx nice=%d calls=%u\n", tmpctx, tmpctx->st0, tmpctx->st1, tmpctx->st2, tmpctx->applet->name, - tmpctx->thread_mask); + tmpctx->thread_mask, + tmpctx->t->nice, tmpctx->t->calls); } if ((cs = objt_cs(strm->si[1].end)) != NULL) { @@ -2944,13 +2945,14 @@ static int stats_dump_full_strm_to_buffer(struct stream_interface *si, struct st } else if ((tmpctx = objt_appctx(strm->si[1].end)) != NULL) { chunk_appendf(&trash, - " app1=%p st0=%d st1=%d st2=%d applet=%s tmask=0x%lx\n", + " app1=%p st0=%d st1=%d st2=%d applet=%s tmask=0x%lx, nice=%d, calls=%u\n", tmpctx, tmpctx->st0, tmpctx->st1, tmpctx->st2, tmpctx->applet->name, - tmpctx->thread_mask); + tmpctx->thread_mask, + tmpctx->t->nice, tmpctx->t->calls); } chunk_appendf(&trash,