fix: Implement periodic logging of task queue size - #1978
Merged
chejinge merged 3 commits intoSep 15, 2023
Merged
Conversation
Signed-off-by: tianpingan <tianpingan2000@gmail.com>
Signed-off-by: tianpingan <tianpingan2000@gmail.com>
Signed-off-by: tianpingan <tianpingan2000@gmail.com>
AlexStocks
approved these changes
Sep 13, 2023
chejinge
reviewed
Sep 15, 2023
| size_t max_size = ClientProcessorThreadPoolMaxQueueSize(); | ||
| size_t thread_hold = (max_size / 100) * QUEUE_SIZE_THRESHOLD_PERCENTAGE; | ||
| if (cur_size > thread_hold) { | ||
| LOG(INFO) << "The current queue size of the Pika Server's client thread processor thread pool: " << cur_size; |
Collaborator
There was a problem hiding this comment.
方便的话辛苦加一下队列输出的时间点,要不不知道跟毛刺啥的对不对的上
chejinge
approved these changes
Sep 15, 2023
bigdaronlee163
pushed a commit
to bigdaronlee163/pika
that referenced
this pull request
Jun 8, 2024
…n#1978) * fix: Implement periodic logging of task queue size
cheniujh
pushed a commit
to cheniujh/pika
that referenced
this pull request
Sep 24, 2024
…n#1978) * fix: Implement periodic logging of task queue size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements periodic logging of task queue size.
It will print the current queue size if the thread pool queue size exceeds QUEUE_SIZE_THRESHOLD_PERCENTAGE/100 of the maximum queue size every 5 seconds.
related issue: #1961