Strange estimated progress bar
Parth Malwankar
parth.malwankar at gmail.com
Thu Jul 8 03:56:56 BST 2010
On Thu, Jul 8, 2010 at 3:04 AM, John Arbash Meinel
<john at arbash-meinel.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I just saw this while grabbing some mysql code:
> - 36348kB 328kB/s | Fetching revisions:Inserting stream:Estimate
> 18516/2654
>
>
> Note that it wasn't wrapping in my terminal, but somehow the current
> position was significantly higher than the estimate. The estimate *was*
> going up, but not as fast as the actual. Later:
>
> | 52120kB 133kB/s | Fetching revisions:Inserting stream:Estimate
> 30031/4299
>
>
> Did something get messed up in the estimation code? Is it swapping the
> current and max values?
>
Thats weird.
The logic seems to be ok. It won't allow the max to exceed the count.
And the usage of pb.update seems ok too.
def increment(self, count):
...
self.current += count
if self.current > self.max:
self.max += self.key_count
repofmt/groupcompress_repo.py:
pb.update('Estimate', rc.current, rc.max)
smart/repository.py: pb.update('Estimate',
rc.current, rc.max)
I will try to get the mysql branch and see if I can get why this might be
happening.
Regards,
Parth
More information about the bazaar
mailing list