Closed lixd closed 1 year ago
Please refer to documentation of ewma lib.
TLDR You have to pick correct weight parameter. If you choose anything than 30, ewma lib will need to collect 10 samples before any result. In your code sample you've chosen 90 and got 0 result, which means there were less than 10 samples.
@vbauerster thanks for your replay,but why this example bytes counter example it ok, params in my code is same with this. what need i do to fix my code? help~
use 0 as arg to ewma, that will default to implementation that doesn't require prerequisite samples.
https://github.com/vbauerster/mpb/blob/314158faaf7557a31a22ab69bd491799d46f2e3f/decor/eta.go#L30
Thanks,but unfortunately,i tried use 0 as arg to ewma,,but not work too.
the bar like this:
time is 0s,speed is 8.06 GiB/s,but really speed is less than 600MiB/s
when use AverageSpeed,is ok,bar like this:
and test bytes counter example ,is ok.
my code like this