Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Implement periodic logging of task queue size #1978

Merged

Conversation

Tianpingan
Copy link
Contributor

@Tianpingan Tianpingan commented Sep 12, 2023

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

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

方便的话辛苦加一下队列输出的时间点,要不不知道跟毛刺啥的对不对的上

@chejinge chejinge merged commit 0990487 into OpenAtomFoundation:unstable Sep 15, 2023
11 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants