From: Willy Tarreau Date: Thu, 31 May 2018 12:40:19 +0000 (+0200) Subject: MINOR: stats: also report the nice and number of calls for applets X-Git-Tag: v1.9-dev1~215 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34b1facbcf0e7abbf3c58709d1a9cbe4ac608519;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/stream.c b/src/stream.c index 7ad84e993c..9fdf6621b3 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,