transport speed indication could be "smoother"
Bug #328649 reported by
Jelmer Vernooij
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
affects bzr
The transport speed indicator fluctuates a lot at the moment; it
would be nice if it could use historic data a little bit to be
"smoother"; perhaps just showing the average of the last X speeds?
tags: | added: progress |
Changed in bzr: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
tags: | added: check-for-breezy |
To post a comment you must log in.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jelmer Vernooij wrote:
> Public bug reported:
>
>
> affects bzr
>
> The transport speed indicator fluctuates a lot at the moment; it
> would be nice if it could use historic data a little bit to be
> "smoother"; perhaps just showing the average of the last X speeds?
Right now it does a 0.2s average. I found that 0.5s worked well for what
I expected. (My guess is that 0.2 is short enough that we get some
initial small-bytes read and processed, and then a lot of lag before we
get the next big-bytes processed.)
Any further than that, and I would use a first-order filter (rate =
old_rate * X + new_rate * (1-X))
So the quick fix is to just change the "0.2s" to "0.5s" and see what you
think:
=== modified file 'bzrlib/ui/text.py' _update_ time is None:
self. _transport_ update_ time = now transport_ update_ time + 0.2): transport_ update_ time + 0.5): since_update / (now - _update_ time)
- --- bzrlib/ui/text.py 2009-01-21 05:49:18 +0000
+++ bzrlib/ui/text.py 2009-02-12 18:19:37 +0000
@@ -219,7 +219,7 @@
now = time.time()
if self._transport
- - elif now >= (self._
+ elif now >= (self._
# guard against clock stepping backwards, and don't update too
# often
rate = self._bytes_
self._transport
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org
UaFAACgkQJdeBCY SNAAMMQwCfcdMSz DWUt4e7+ yrxbMZPG5Ui +/77LbhpEN1liuu kE
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkm
BOoAoJt3fti7weL
=xDbH
-----END PGP SIGNATURE-----