From b620d0955b8d35d08c969ac6dff7b9882ecb363b Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@lothar.com>
Date: Sun, 26 Aug 2007 23:42:39 -0700
Subject: [PATCH] debug.py: add share-overhead size info to dump-uri-extension

---
 src/allmydata/scripts/debug.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

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
 
-- 
2.45.2