From: Brian Warner Date: Mon, 27 Aug 2007 06:42:39 +0000 (-0700) Subject: debug.py: add share-overhead size info to dump-uri-extension X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri//%22%22?a=commitdiff_plain;h=b620d0955b8d35d08c969ac6dff7b9882ecb363b;p=tahoe-lafs%2Ftahoe-lafs.git debug.py: add share-overhead size info to dump-uri-extension --- diff --git a/src/allmydata/scripts/debug.py b/src/allmydata/scripts/debug.py index eae0afc7..28a69320 100644 --- a/src/allmydata/scripts/debug.py +++ b/src/allmydata/scripts/debug.py @@ -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