]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/BarrierTracing.java
Add possibility to bookkeep barrier tracing with env var
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / graph / BarrierTracing.java
index 68fdd824ed29f95eee0fa8f1cb0a49eb9dcebf92..3c9b7a011adf71ffa3e48d94293bd9673def5505 100644 (file)
@@ -11,7 +11,12 @@ import org.simantics.db.impl.query.QueryProcessor.SessionTask;
 
 public class BarrierTracing {
 
-    public static final boolean BOOKKEEPING = false;
+    private static final String KEY = "SIMANTICS_DB_IMPL_BARRIER_TRACING";
+
+    public static final boolean BOOKKEEPING = Boolean.parseBoolean(
+            System.getProperty("org.simantics.db.impl.barrierTracing",
+            System.getenv(KEY) != null ? System.getenv(KEY) : "false")
+        );
     static final boolean RESTART_GUARD = BOOKKEEPING && false;
 
     public static Map<SessionTask,Exception> tasks = new HashMap<>();