summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2018-12-15 14:44:45 -0800
committerGeorge Fraser <george@fivetran.com>2018-12-15 14:44:45 -0800
commitbaa91cf234e5863c27c41d4363c2a1ec49813940 (patch)
tree76c7aa904cc75f5d77e04d9d0790e6c95700c5d8 /src
parent4533aaf75a75bc64ae67e685cdff95a96a6cf5cc (diff)
downloadjava-language-server-baa91cf234e5863c27c41d4363c2a1ec49813940.zip
Only show real phases
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/javacs/JavaCompilerService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/javacs/JavaCompilerService.java b/src/main/java/org/javacs/JavaCompilerService.java
index 28e0de8..8bc7bfb 100644
--- a/src/main/java/org/javacs/JavaCompilerService.java
+++ b/src/main/java/org/javacs/JavaCompilerService.java
@@ -200,7 +200,8 @@ public class JavaCompilerService {
void print() {
var lines = new StringJoiner("\n\t");
for (var k : TaskEvent.Kind.values()) {
- var elapsed = profile.getOrDefault(k, Duration.ZERO);
+ if (!profile.containsKey(k)) continue;
+ var elapsed = profile.get(k);
var ms = elapsed.getSeconds() * 1000 + elapsed.getNano() / 1000 / 1000;
lines.add(String.format("%s: %dms", k, ms));
}