aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Kempin2013-03-15 04:39:18 (EDT)
committerEdwin Kempin2013-03-15 04:42:19 (EDT)
commit9b20a3b0dd5d5f765c7f5c014b8e982ecf114b74 (patch)
tree76040f1fa5c4678346f694966d5cde5d732c24da
parent8e2a24a3b636d22a973e89763b5dbf11ec0d6821 (diff)
downloadjgit-9b20a3b0dd5d5f765c7f5c014b8e982ecf114b74.zip
jgit-9b20a3b0dd5d5f765c7f5c014b8e982ecf114b74.tar.gz
jgit-9b20a3b0dd5d5f765c7f5c014b8e982ecf114b74.tar.bz2
Add toString() for RepoStatisticsrefs/changes/86/11186/1
This is helpful for writing the repository statistics into a log file. Change-Id: I0e8cd9ad05f123ab3851960890a50213f353a373 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/file/GC.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/GC.java
index b93ce2b..6fc7b97 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/GC.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/GC.java
@@ -824,6 +824,18 @@ public class GC {
* The number of refs stored in pack files.
*/
public long numberOfPackedRefs;
+
+ public String toString() {
+ final StringBuilder b = new StringBuilder();
+ b.append("numberOfPackedObjects=").append(numberOfPackedObjects); //$NON-NLS-1$
+ b.append(",numberOfPackFiles=").append(numberOfPackFiles); //$NON-NLS-1$
+ b.append(", numberOfLooseObjects=").append(numberOfLooseObjects); //$NON-NLS-1$
+ b.append(", numberOfLooseRefs=").append(numberOfLooseRefs); //$NON-NLS-1$
+ b.append(", numberOfPackedRefs=").append(numberOfPackedRefs); //$NON-NLS-1$
+ b.append(", sizeOfLooseObjects=").append(sizeOfLooseObjects); //$NON-NLS-1$
+ b.append(", sizeOfPackedObjects=").append(sizeOfPackedObjects); //$NON-NLS-1$
+ return b.toString();
+ }
}
/**