File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
gax-java/gax/src/main/java/com/google/api/gax/core Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 3434import java .util .concurrent .ScheduledThreadPoolExecutor ;
3535import java .util .concurrent .ThreadFactory ;
3636import java .util .concurrent .atomic .AtomicInteger ;
37+ import java .util .logging .Level ;
38+ import java .util .logging .Logger ;
3739
3840/**
3941 * InstantiatingChannelProvider is an ExecutorProvider which constructs a new
4042 * ScheduledExecutorService every time getExecutor() is called.
4143 */
4244@ AutoValue
4345public abstract class InstantiatingExecutorProvider implements ExecutorProvider {
46+ private static final Logger LOGGER =
47+ Logger .getLogger (InstantiatingExecutorProvider .class .getName ());
48+
4449 // Thread factory to use to create our worker threads
4550 private static final ThreadFactory DEFAULT_THREAD_FACTORY =
4651 new ThreadFactory () {
@@ -95,6 +100,8 @@ public static Builder newBuilder() {
95100 public static Builder newIOBuilder () {
96101 int numCpus = Runtime .getRuntime ().availableProcessors ();
97102 int numThreads = IO_THREAD_MULTIPLIER * Math .max (MIN_THREAD_AMOUNT , numCpus );
103+ LOGGER .log (
104+ Level .CONFIG , String .format ("Thread Pool for requests has Core Pool Size: %d" , numThreads ));
98105
99106 return new AutoValue_InstantiatingExecutorProvider .Builder ()
100107 .setExecutorThreadCount (numThreads )
You can’t perform that action at this time.
0 commit comments