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

feature request: WorkerCount() for gopool #136

Closed
lvsz1 opened this issue May 15, 2022 · 1 comment · Fixed by #137
Closed

feature request: WorkerCount() for gopool #136

lvsz1 opened this issue May 15, 2022 · 1 comment · Fixed by #137
Labels
enhancement New feature or request

Comments

@lvsz1
Copy link
Contributor

lvsz1 commented May 15, 2022

Summary

gopool是否可以开放WorkerCount()接口,用于业务监控gopool内goroutines数量,为gopool SetCap阈值提供依据

Motivation

服务由于某些原因偶发Goroutines毛刺,导致CPU&Mem瞬间上涨,影响服务稳定性。因此想基于gopool.SetCap限制Goroutines数量,但Cap的阈值不太好确定(服务可以提供整个实例的Goroutines数量,但无法确定gopool协程池部分的Goroutines数量)。

Explanation

No response

@lvsz1 lvsz1 added the enhancement New feature or request label May 15, 2022
@lvsz1 lvsz1 changed the title WorkerCount() for gopool feature request: WorkerCount() for gopool May 15, 2022
@PureWhiteWu
Copy link
Collaborator

看着应该可以,你有意愿提个 pr 来加一下么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants