summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2018-12-27 13:09:56 -0800
committerGeorge Fraser <george@fivetran.com>2018-12-27 13:09:56 -0800
commit5b2339d7a7a33edd7fe6390181b2e26e167e3c92 (patch)
tree021746bc6f60d1fab914bba9c0e5be28f42a0c00 /src
parentcbcbbd22afdd867f4f43817dc53df3800814b0ba (diff)
downloadjava-language-server-5b2339d7a7a33edd7fe6390181b2e26e167e3c92.zip
Log n-files
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/javacs/Profiler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/javacs/Profiler.java b/src/main/java/org/javacs/Profiler.java
index 97468b7..4dfabd4 100644
--- a/src/main/java/org/javacs/Profiler.java
+++ b/src/main/java/org/javacs/Profiler.java
@@ -1,18 +1,21 @@
package org.javacs;
import com.sun.source.util.*;
+import java.net.URI;
import java.time.Duration;
import java.time.Instant;
import java.util.*;
import java.util.logging.Logger;
class Profiler implements TaskListener {
+ Set<URI> files = new HashSet<>();
Map<TaskEvent.Kind, Instant> started = new EnumMap<>(TaskEvent.Kind.class);
Map<TaskEvent.Kind, Duration> profile = new EnumMap<>(TaskEvent.Kind.class);
@Override
public void started(TaskEvent e) {
started.put(e.getKind(), Instant.now());
+ files.add(e.getSourceFile().toUri());
}
@Override
@@ -33,7 +36,7 @@ class Profiler implements TaskListener {
var ms = elapsed.getSeconds() * 1000 + elapsed.getNano() / 1000 / 1000;
lines.add(String.format("%s: %dms", k, ms));
}
- LOG.info("Compilation profile:\n\t" + lines);
+ LOG.info(String.format("Compiled %d files:\n\t%s", files.size(), lines));
}
private static final Logger LOG = Logger.getLogger("main");