This commit is contained in:
Max Schaefer 2018-11-14 14:45:12 +00:00
Родитель a6cb63e9c8
Коммит 3b5315aa7e
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -393,10 +393,13 @@ public class AutoBuild {
private void startThreadPool() {
int defaultNumThreads = Runtime.getRuntime().availableProcessors();
int numThreads = Env.systemEnv().getInt("LGTM_INDEX_THREADS", defaultNumThreads);
if (numThreads > 1)
if (numThreads > 1) {
System.out.println("Parallel extraction with " + numThreads + " threads.");
threadPool = Executors.newFixedThreadPool(numThreads);
else
} else {
System.out.println("Single-threaded extraction.");
threadPool = null;
}
}
private void shutdownThreadPool() {
@ -680,6 +683,7 @@ public class AutoBuild {
long end = System.nanoTime();
int milliseconds = (int) ((end - timedLogMessageStart) / 1_000_000);
System.out.println(message + " (" + milliseconds + " ms)");
System.out.flush();
}
public static void main(String[] args) {