aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kobetic <mkobetic@gmail.com>2014-05-12 20:46:01 +0000
committerMartin Kobetic <mkobetic@gmail.com>2014-05-12 20:46:01 +0000
commit4dbd354a8d9b4dae839de6e24707017af432ba2f (patch)
tree38dcbc53bcf449521d150a355e0087dd0557b2d2
parenttweaks (diff)
downloaddedo-4dbd354a8d9b4dae839de6e24707017af432ba2f.tar.gz
dedo-4dbd354a8d9b4dae839de6e24707017af432ba2f.tar.xz
add inline stats to cmd
-rw-r--r--cmd/bolt/stats.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/bolt/stats.go b/cmd/bolt/stats.go
index 6f8505a..6968273 100644
--- a/cmd/bolt/stats.go
+++ b/cmd/bolt/stats.go
@@ -51,6 +51,14 @@ func Stats(path, prefix string) {
printf("\tBytes allocated for physical leaf pages: %d\n", s.LeafAlloc)
percentage = int(float32(s.LeafInuse) * 100.0 / float32(s.LeafAlloc))
printf("\tBytes actually used for leaf data: %d (%d%%)\n", s.LeafInuse, percentage)
+
+ println("Bucket statistics ")
+ printf("\tTotal number of buckets: %d\n", s.BucketN)
+ percentage = int(float32(s.InlineBucketN) * 100.0 / float32(s.BucketN))
+ printf("\tTotal number on inlined buckets: %d (%d%%)\n", s.InlineBucketN, percentage)
+ percentage = int(float32(s.InlineBucketInuse) * 100.0 / float32(s.LeafInuse))
+ printf("\tBytes used for inlined buckets: %d (%d%%)\n", s.InlineBucketInuse, percentage)
+
return nil
})
if err != nil {