diff options
author | Sam Delmerico <delmerico@google.com> | 2024-08-27 13:27:35 -0700 |
---|---|---|
committer | Ivan Frade <ifrade@google.com> | 2024-08-27 22:40:46 +0000 |
commit | c318c8a435f584ac00d1cb24292da0f8a956707d (patch) | |
tree | fd375da29dc2ea112d31b47aee1c5f40accea481 | |
parent | 6e15524470d9b822a10644cee47e8475eea9f049 (diff) | |
download | jgit-c318c8a435f584ac00d1cb24292da0f8a956707d.tar.gz jgit-c318c8a435f584ac00d1cb24292da0f8a956707d.zip |
DfsPackFile: re-add metrics for bitmap index loads
The calculations for readBitmapIdxBytes and readBitmapIdxMicros
metrics were unintentionally removed in
https://gerrithub.io/c/eclipse-jgit/jgit/+/1177262, so this change
adds those metrics back.
Change-Id: I7ac7769acd092680933a27b2b3e70dd67690cfbf
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java index 845feab5ac..48ed47a77c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java @@ -1280,9 +1280,12 @@ public final class DfsPackFile extends BlockBasedFile { private DfsBlockCache.Ref<PackBitmapIndex> loadBitmapIndex(DfsReader ctx, DfsStreamKey bitmapKey) throws IOException { ctx.stats.readBitmap++; + long start = System.nanoTime(); PackBitmapIndexLoader.LoadResult result = bitmapLoader .loadPackBitmapIndex(ctx, this); bitmapIndex = result.bitmapIndex; + ctx.stats.readBitmapIdxBytes += result.bytesRead; + ctx.stats.readBitmapIdxMicros += elapsedMicros(start); return new DfsBlockCache.Ref<>(bitmapKey, REF_POSITION, result.bytesRead, result.bitmapIndex); } |