mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-07 14:01:54 +00:00
BUILD: cli/threads: fix build in single-threaded mode
Commit a8f57d51a
("MINOR: cli/activity: report the accept queue sizes
in "show activity"") broke the single-threaded build because the
accept-rings are not implemented there. Let's ifdef this out. Ideally
we should start to think about always having such elements initialized
even without threads to improve the test coverage.
This commit is contained in:
parent
3466e3cdcb
commit
e61828449c
@ -1071,7 +1071,9 @@ static int cli_io_handler_show_activity(struct appctx *appctx)
|
||||
chunk_appendf(&trash, "\naccepted:"); for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].accepted);
|
||||
chunk_appendf(&trash, "\naccq_pushed:"); for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].accq_pushed);
|
||||
chunk_appendf(&trash, "\naccq_full:"); for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].accq_full);
|
||||
#ifdef USE_THREAD
|
||||
chunk_appendf(&trash, "\naccq_ring:"); for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", (accept_queue_rings[thr].tail - accept_queue_rings[thr].head + ACCEPT_QUEUE_SIZE)%ACCEPT_QUEUE_SIZE);
|
||||
#endif
|
||||
|
||||
chunk_appendf(&trash, "\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user