]> source.dussan.org Git - jgit.git/commit
Add `numberOfPackFilesAfterBitmap` to RepoStatistics 35/1203735/3
authorJacek Centkowski <geminica.programs@gmail.com>
Fri, 20 Sep 2024 06:47:13 +0000 (08:47 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 7 Nov 2024 22:53:55 +0000 (23:53 +0100)
commit93ede18ffd17df936da4e8d0ef28e2ba69019c93
tree1a511428c34daf4c7603d6f0b000b9563522fb9b
parent958d053920a27ee1de0b5290099e4f7149de2c4b
Add `numberOfPackFilesAfterBitmap` to RepoStatistics

Introduce a `numberOfPackFilesAfterBitmap` that contains the number of
packfiles created since the latest bitmap generation.

Notes:
* the `repo.getObjectDatabase().getPacks()` that obtains the list of
  packs (in the existing `getStatistics` function) uses
  `PackDirectory.scanPacks` that boils down to call
  `PackDirectory.scanPacksImpl` which is sorting packs prior returning
  them therefore the `numberOfPackFilesAfterBitmap` is just all packs
  before the one that has bitmap attached
* the improved version of `packAndPrune` function (one that skips
  non-existent packfiles) was introduced for testing

Change-Id: I608011462f104fc002ac527aa405f492a8a4b0c2
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcNumberOfPackFilesAfterBitmapStatisticsTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java