D820: progress: make ETA only consider progress made in the last minute
quark (Jun Wu)
phabricator at mercurial-scm.org
Wed Sep 27 18:25:24 UTC 2017
quark added a comment.
> Is there a reason you went with 60s? Have you experimented with shorter values? (Obviously this can be bikeshedded later because it is a config option and easy to change. I'm just curious where magic numbers come from.)
Intuitively, shorter values can make things less smooth (xkcd612 <https://xkcd.com/612/>). That said, 60s was not chosen very scientifically. If it has to come from something, maybe the first interval of `uptime`. I have that value displayed in my i3-status.
> I'm also not sure why `progress.estimate` is experimental. I think we should remove that label.
That's what I thought too. I'll send a follow-up.
INLINE COMMENTS
> indygreg wrote in progress.py:108
> Do we not have a configfloat()? This is being used in the context of non-integer math, so IMO it should be a float.
Thanks. I wasn't aware `configfloat` is available. It should be used here.
> indygreg wrote in progress.py:265
> Nit: maybe just cast something to a float so we can avoid the useless multiply by 1.0?
Right. `configfloat` will solve that.
> mbthomas wrote in progress.py:266-267
> I think this is saying: "if we suddenly start going really slowly (e.g. a stall), don't give wildly high estimates." Is that right?
Yes.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D820
To: quark, #hg-reviewers, mbthomas
Cc: indygreg, mbthomas, mercurial-devel
More information about the Mercurial-devel
mailing list