Rev 25: Change the pb to update on every entry. in http://bazaar.launchpad.net/%7Ebzr/bzr-repodetails/trunk
John Arbash Meinel
john at arbash-meinel.com
Thu Feb 19 17:37:47 GMT 2009
At http://bazaar.launchpad.net/%7Ebzr/bzr-repodetails/trunk
------------------------------------------------------------
revno: 25
revision-id: john at arbash-meinel.com-20090219173714-ztn05oosmgkgs9j3
parent: john at arbash-meinel.com-20090212230220-myirk8ntfv7lu21s
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Thu 2009-02-19 11:37:14 -0600
message:
Change the pb to update on every entry.
This makes it much more responsive for things like GC which
extract all texts as you go.
-------------- next part --------------
=== modified file 'gather_stats.py'
--- a/gather_stats.py 2009-02-12 23:02:20 +0000
+++ b/gather_stats.py 2009-02-19 17:37:14 +0000
@@ -204,9 +204,10 @@
pb = ui.ui_factory.nested_progress_bar()
try:
for offset in xrange(0, len(keys), batch_size):
- pb.update(kind, offset, len(keys))
batch = keys[offset:offset + batch_size]
- for entry in vf.get_record_stream(batch, 'unordered', True):
+ for idx, entry in enumerate(
+ vf.get_record_stream(batch, 'unordered', True)):
+ pb.update(kind, offset+idx, len(keys))
bytes = entry.get_bytes_as('fulltext')
objectstats.add_raw_size(len(bytes))
yield bytes, entry.key
More information about the bazaar-commits
mailing list