summaryrefslogtreecommitdiff
path: root/src/main/java/org/javacs/Profiler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/javacs/Profiler.java')
-rw-r--r--src/main/java/org/javacs/Profiler.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/javacs/Profiler.java b/src/main/java/org/javacs/Profiler.java
index c7b6911..e9c3635 100644
--- a/src/main/java/org/javacs/Profiler.java
+++ b/src/main/java/org/javacs/Profiler.java
@@ -8,6 +8,8 @@ import java.util.*;
import java.util.logging.Logger;
class Profiler implements TaskListener {
+ static boolean quiet = false;
+
Set<URI> files = new HashSet<>();
Map<URI, Map<TaskEvent.Kind, Instant>> started = new HashMap<>();
Map<TaskEvent.Kind, Duration> profile = new EnumMap<>(TaskEvent.Kind.class);
@@ -35,6 +37,7 @@ class Profiler implements TaskListener {
}
void print() {
+ if (quiet) return;
var lines = new StringJoiner("; ");
for (var kind : TaskEvent.Kind.values()) {
if (!profile.containsKey(kind)) continue;