summaryrefslogtreecommitdiffstats
path: root/files/reprepro/snapshots
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2016-05-07 15:02:15 +0000
committerintrigeri <intrigeri@boum.org>2016-05-07 15:02:15 +0000
commit07e67b2dc0231e6ec1ad2f921dd5f01b4c10f4fe (patch)
tree1aa78e4b5ca435eec6f79f18d51e4b7466840695 /files/reprepro/snapshots
parent60f1ab8be2e91686dde2bca6e824ddcf02b22be5 (diff)
Print per-pass stats.
Diffstat (limited to 'files/reprepro/snapshots')
-rwxr-xr-xfiles/reprepro/snapshots/time_based/tails-compact-reprepro-db4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/reprepro/snapshots/time_based/tails-compact-reprepro-db b/files/reprepro/snapshots/time_based/tails-compact-reprepro-db
index 76e50eb..4992b54 100755
--- a/files/reprepro/snapshots/time_based/tails-compact-reprepro-db
+++ b/files/reprepro/snapshots/time_based/tails-compact-reprepro-db
@@ -26,11 +26,11 @@ d.open(args.path, dbname=args.db)
for i in range(0, 10):
d.compact(compact_fillpercent=args.compact_fillpercent,
flags=db.DB_FREE_SPACE)
+ print("After pass {n}: {size} bytes"
+ .format(n=i, size=os.path.getsize(args.path)))
d.close()
size_after = os.path.getsize(args.path)
-print("After compacting: {size} bytes".format(size=size_after))
-
print("⇒ saved {size} bytes ({percent}%)"
.format(size=size_before - size_after,
percent=int(100*(size_before - size_after)/size_before)