]> source.dussan.org Git - jgit.git/commit
Add `numberOfPackFilesAfterBitmap` to RepoStatistics 34/1201534/6
authorJacek Centkowski <geminica.programs@gmail.com>
Fri, 20 Sep 2024 06:47:13 +0000 (08:47 +0200)
committerLuca Milanesio <luca.milanesio@gmail.com>
Tue, 22 Oct 2024 11:26:18 +0000 (11:26 +0000)
commit4902b2baf8dde2f6249eb0aeb7f1164921ce5a86
tree7e2c0747753bb44f7a391c100206b3f0d73831e0
parentfe8919d107cbfbc52b84f9b8e9fe55668dfbebb1
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 to
  `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