Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b5315a

Browse files
author
Max Schaefer
committed
JavaScript: Improve logging.
1 parent a6cb63e commit 3b5315a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,13 @@ public void run() throws IOException {
393393
private void startThreadPool() {
394394
int defaultNumThreads = Runtime.getRuntime().availableProcessors();
395395
int numThreads = Env.systemEnv().getInt("LGTM_INDEX_THREADS", defaultNumThreads);
396-
if (numThreads > 1)
396+
if (numThreads > 1) {
397+
System.out.println("Parallel extraction with " + numThreads + " threads.");
397398
threadPool = Executors.newFixedThreadPool(numThreads);
398-
else
399+
} else {
400+
System.out.println("Single-threaded extraction.");
399401
threadPool = null;
402+
}
400403
}
401404

402405
private void shutdownThreadPool() {
@@ -680,6 +683,7 @@ private void logEndProcess(long timedLogMessageStart, String message) {
680683
long end = System.nanoTime();
681684
int milliseconds = (int) ((end - timedLogMessageStart) / 1_000_000);
682685
System.out.println(message + " (" + milliseconds + " ms)");
686+
System.out.flush();
683687
}
684688

685689
public static void main(String[] args) {

0 commit comments

Comments
 (0)