aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2023-01-19 01:46:50 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2023-02-27 16:41:33 -0500
commit2d0b9080488239018908c7712dc440461991907a (patch)
treeafaf4e2b98c2fc82b6b5cad8df6c7a53feefca86 /org.eclipse.jgit.junit
parentca2c57b2ec5400db9c9446056b001a83adc5ccd8 (diff)
downloadjgit-2d0b9080488239018908c7712dc440461991907a.tar.gz
jgit-2d0b9080488239018908c7712dc440461991907a.zip
BatchingProgressMonitor: expose time spent per task
Display elapsed time per task if enabled via ProgressMonitor#showDuration or if system property or environment variable GIT_TRACE_PERFORMANCE is set to "true". If both the system property and the environment variable are set the system property takes precedence. E.g. using jgit CLI: $ GIT_TRACE_PERFORMANCE=true jgit clone https://foo.bar/foobar Cloning into 'foobar'... remote: Counting objects: 1 [0.002s] remote: Finding sources: 100% (15531/15531) [0.006s] Receiving objects: 100% (169737/169737) [13.045s] Resolving deltas: 100% (67579/67579) [1.842s] Change-Id: I4d624e7858b286aeddbe7d4e557589986d73659e
Diffstat (limited to 'org.eclipse.jgit.junit')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/StrictWorkMonitor.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/StrictWorkMonitor.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/StrictWorkMonitor.java
index 96d7aac54c..c77bca9751 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/StrictWorkMonitor.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/StrictWorkMonitor.java
@@ -50,4 +50,9 @@ public final class StrictWorkMonitor implements ProgressMonitor {
public boolean isCancelled() {
return false;
}
+
+ @Override
+ public void showDuration(boolean enabled) {
+ // not implemented
+ }
}