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

Log the ThreadPool size from Gax #2680

Closed
lqiu96 opened this issue Apr 22, 2024 · 2 comments · Fixed by #2697
Closed

Log the ThreadPool size from Gax #2680

lqiu96 opened this issue Apr 22, 2024 · 2 comments · Fixed by #2697
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@lqiu96
Copy link
Contributor

lqiu96 commented Apr 22, 2024

For the InstantiatingExecutorProvider, log the thread pool size for users to determine.

public static Builder newIOBuilder() {
int numCpus = Runtime.getRuntime().availableProcessors();
int numThreads = IO_THREAD_MULTIPLIER * Math.max(MIN_THREAD_AMOUNT, numCpus);
return new AutoValue_InstantiatingExecutorProvider.Builder()
.setExecutorThreadCount(numThreads)
.setThreadFactory(DEFAULT_THREAD_FACTORY);
}

@lqiu96 lqiu96 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Apr 22, 2024
@lqiu96 lqiu96 self-assigned this Apr 22, 2024
@blakeli0
Copy link
Collaborator

Do customers want to log the active thread count? or only the static max numThreads?

@lqiu96
Copy link
Contributor Author

lqiu96 commented Apr 22, 2024

Do customers want to log the active thread count? or only the static max numThreads?

The static numThreads value. I believe logging the active thread count would be zero when this log statement is run and tracking the active thread count over the lifecycle of the client may be difficult as it changes too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants