]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
debug.py: add share-overhead size info to dump-uri-extension
authorBrian Warner <warner@lothar.com>
Mon, 27 Aug 2007 06:42:39 +0000 (23:42 -0700)
committerBrian Warner <warner@lothar.com>
Mon, 27 Aug 2007 06:42:39 +0000 (23:42 -0700)
src/allmydata/scripts/debug.py

index eae0afc77fa9692d2c8c6ec56ecfab334d02bc49..28a693209e50220a9d55d29085f7b822c33ede2b 100644 (file)
@@ -80,6 +80,16 @@ def dump_uri_extension(config, out=sys.stdout, err=sys.stderr):
         for k in sorted(leftover):
             print >>out, "%s: %s" % (k, unpacked[k])
 
+    sizes = {}
+    sizes['data'] = bp._data_size
+    sizes['validation'] = (offsets['uri_extension'] -
+                           offsets['plaintext_hash_tree'])
+    sizes['uri-extension'] = len(data)
+    print >>out
+    print >>out, "Size of data within the share:"
+    for k in sorted(sizes):
+        print >>out, "%19s: %s" % (k, sizes[k])
+
     print >>out
     return 0