From 38344badf442afa1f6e8ee45c54e95d939efa868 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 8 Nov 2023 02:49:23 +0100 Subject: [PATCH] Document GIT_TRACE_PERFORMANCE to show timings Change-Id: I5a39b072c50e64a2d940680ed85866edfe9d0d28 --- Documentation/config-options.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Documentation/config-options.md b/Documentation/config-options.md index e84dbd564..84c4f5a66 100644 --- a/Documentation/config-options.md +++ b/Documentation/config-options.md @@ -132,4 +132,20 @@ Proxy configuration uses the standard Java mechanisms via class `java.net.ProxyS | option | default | git option | description | |---------|---------|------------|-------------| -| `repack.packKeptObjects` | `true` when `pack.buildBitmaps` is set, `false` otherwise | ✅ | Include objects in packs locked by a `.keep` file when repacking. | \ No newline at end of file +| `repack.packKeptObjects` | `true` when `pack.buildBitmaps` is set, `false` otherwise | ✅ | Include objects in packs locked by a `.keep` file when repacking. | + +## Tracing + +**GIT_TRACE_PERFORMANCE**: set this to `true` as a Java system property or environment variable to trace timings from the progress monitor. The system property takes +precedence. Defaults to `false`. Can also be set programmatically via `ProgressMonitor#showDuration`. + +*Example using JGit CLI:* + +```bash +$ 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] +```