From ce3a7ca3bf0b5f8ad9d14efb730c8d3d204e802a Mon Sep 17 00:00:00 2001 From: Jacek Centkowski Date: Mon, 11 Nov 2024 12:36:03 +0100 Subject: [PATCH] Rename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap As sugested in I608011462f1. Change-Id: If66226dd7b08ae768413fa614df5dcb6b44dc118 --- ...umberOfPackFilesSinceBitmapStatisticsTest.java} | 14 +++++++------- .../org/eclipse/jgit/internal/storage/file/GC.java | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) rename org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/{GcNumberOfPackFilesAfterBitmapStatisticsTest.java => GcNumberOfPackFilesSinceBitmapStatisticsTest.java} (91%) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcNumberOfPackFilesAfterBitmapStatisticsTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcNumberOfPackFilesSinceBitmapStatisticsTest.java similarity index 91% rename from org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcNumberOfPackFilesAfterBitmapStatisticsTest.java rename to org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcNumberOfPackFilesSinceBitmapStatisticsTest.java index 820f0c768d..42b99ae512 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcNumberOfPackFilesAfterBitmapStatisticsTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcNumberOfPackFilesSinceBitmapStatisticsTest.java @@ -33,18 +33,18 @@ import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.util.FileUtils; import org.junit.Test; -public class GcNumberOfPackFilesAfterBitmapStatisticsTest extends GcTestCase { +public class GcNumberOfPackFilesSinceBitmapStatisticsTest extends GcTestCase { @Test public void testShouldReportZeroObjectsForInitializedRepo() throws IOException { - assertEquals(0L, gc.getStatistics().numberOfPackFilesAfterBitmap); + assertEquals(0L, gc.getStatistics().numberOfPackFilesSinceBitmap); } @Test public void testShouldReportAllPackFilesWhenNoGcWasPerformed() throws Exception { packAndPrune(); - long result = gc.getStatistics().numberOfPackFilesAfterBitmap; + long result = gc.getStatistics().numberOfPackFilesSinceBitmap; assertEquals(repo.getObjectDatabase().getPacks().size(), result); } @@ -55,11 +55,11 @@ public class GcNumberOfPackFilesAfterBitmapStatisticsTest extends GcTestCase { addCommit(null); gc.gc().get(); assertEquals(1L, repositoryBitmapFiles()); - assertEquals(0L, gc.getStatistics().numberOfPackFilesAfterBitmap); + assertEquals(0L, gc.getStatistics().numberOfPackFilesSinceBitmap); } @Test - public void testShouldReportNewObjectsAfterGcWhenRepositoryProgresses() + public void testShouldReportNewObjectsSinceGcWhenRepositoryProgresses() throws Exception { // commit & gc RevCommit parent = addCommit(null); @@ -70,7 +70,7 @@ public class GcNumberOfPackFilesAfterBitmapStatisticsTest extends GcTestCase { addCommit(parent); packAndPrune(); - assertEquals(1L, gc.getStatistics().numberOfPackFilesAfterBitmap); + assertEquals(1L, gc.getStatistics().numberOfPackFilesSinceBitmap); } @Test @@ -90,7 +90,7 @@ public class GcNumberOfPackFilesAfterBitmapStatisticsTest extends GcTestCase { addCommit(parent); packAndPrune(); - assertEquals(1L, gc.getStatistics().numberOfPackFilesAfterBitmap); + assertEquals(1L, gc.getStatistics().numberOfPackFilesSinceBitmap); } private void packAndPrune() throws Exception { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java index 34b5ec01e1..d8eb751136 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java @@ -1512,7 +1512,7 @@ public class GC { * The number of pack files that were created after the last bitmap * generation. */ - public long numberOfPackFilesAfterBitmap; + public long numberOfPackFilesSinceBitmap; /** * The number of objects stored as loose objects. @@ -1549,8 +1549,8 @@ public class GC { final StringBuilder b = new StringBuilder(); b.append("numberOfPackedObjects=").append(numberOfPackedObjects); //$NON-NLS-1$ b.append(", numberOfPackFiles=").append(numberOfPackFiles); //$NON-NLS-1$ - b.append(", numberOfPackFilesAfterBitmap=") //$NON-NLS-1$ - .append(numberOfPackFilesAfterBitmap); + b.append(", numberOfPackFilesSinceBitmap=") //$NON-NLS-1$ + .append(numberOfPackFilesSinceBitmap); b.append(", numberOfLooseObjects=").append(numberOfLooseObjects); //$NON-NLS-1$ b.append(", numberOfLooseRefs=").append(numberOfLooseRefs); //$NON-NLS-1$ b.append(", numberOfPackedRefs=").append(numberOfPackedRefs); //$NON-NLS-1$ @@ -1578,7 +1578,7 @@ public class GC { if (p.getBitmapIndex() != null) ret.numberOfBitmaps += p.getBitmapIndex().getBitmapCount(); else - ret.numberOfPackFilesAfterBitmap++; + ret.numberOfPackFilesSinceBitmap++; } File objDir = repo.getObjectsDirectory(); String[] fanout = objDir.list(); -- 2.39.5