GarbageCollectCommand: add numberOfBitmaps to statistics
Change-Id: I630afac9408c7313d1cecb1b24476f645c94fc27 Signed-off-by: kylezhao <kylezhao@tencent.com>
This commit is contained in:
parent
4657e7a99a
commit
578b6a79a3
|
@ -39,7 +39,7 @@ public void testGConeCommit() throws Exception {
|
||||||
Date expire = GitDateParser.parse("now", null, SystemReader
|
Date expire = GitDateParser.parse("now", null, SystemReader
|
||||||
.getInstance().getLocale());
|
.getInstance().getLocale());
|
||||||
Properties res = git.gc().setExpire(expire).call();
|
Properties res = git.gc().setExpire(expire).call();
|
||||||
assertTrue(res.size() == 7);
|
assertTrue(res.size() == 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -57,6 +57,6 @@ public void testGCmoreCommits() throws Exception {
|
||||||
.setExpire(
|
.setExpire(
|
||||||
GitDateParser.parse("now", null, SystemReader
|
GitDateParser.parse("now", null, SystemReader
|
||||||
.getInstance().getLocale())).call();
|
.getInstance().getLocale())).call();
|
||||||
assertTrue(res.size() == 7);
|
assertTrue(res.size() == 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -324,7 +324,7 @@ public void testPushAfterGC() throws Exception {
|
||||||
|
|
||||||
// run a gc to ensure we have a bitmap index
|
// run a gc to ensure we have a bitmap index
|
||||||
Properties res = git1.gc().setExpire(null).call();
|
Properties res = git1.gc().setExpire(null).call();
|
||||||
assertEquals(7, res.size());
|
assertEquals(8, res.size());
|
||||||
|
|
||||||
// create another commit so we have something else to push
|
// create another commit so we have something else to push
|
||||||
writeTrashFile("b", "content of b");
|
writeTrashFile("b", "content of b");
|
||||||
|
|
|
@ -221,6 +221,7 @@ public Properties getStatistics() throws GitAPIException {
|
||||||
@SuppressWarnings("boxing")
|
@SuppressWarnings("boxing")
|
||||||
private static Properties toProperties(RepoStatistics stats) {
|
private static Properties toProperties(RepoStatistics stats) {
|
||||||
Properties p = new Properties();
|
Properties p = new Properties();
|
||||||
|
p.put("numberOfBitmaps", stats.numberOfBitmaps); //$NON-NLS-1$
|
||||||
p.put("numberOfLooseObjects", stats.numberOfLooseObjects); //$NON-NLS-1$
|
p.put("numberOfLooseObjects", stats.numberOfLooseObjects); //$NON-NLS-1$
|
||||||
p.put("numberOfLooseRefs", stats.numberOfLooseRefs); //$NON-NLS-1$
|
p.put("numberOfLooseRefs", stats.numberOfLooseRefs); //$NON-NLS-1$
|
||||||
p.put("numberOfPackedObjects", stats.numberOfPackedObjects); //$NON-NLS-1$
|
p.put("numberOfPackedObjects", stats.numberOfPackedObjects); //$NON-NLS-1$
|
||||||
|
|
Loading…
Reference in New Issue