In my function xxx, I created a progress bar with 128K jobs. Each job updated durations, while some (tens) of jobs sent duration of time.Duration(0) (my bad, I'll try with 1 ms). And the function xxx was run multiple times. While after the 6th run (3 hours later), some runtime happened (see 2nd code block), which looks related to `mpb.
The app was tested with other small datasets, and everything was fine.
func xxx() {
// process bar
var pbs *mpb.Progress
var bar *mpb.Bar
var chDuration chan time.Duration
var doneDuration chan int
if opt.Verbose {
pbs = mpb.New(mpb.WithWidth(40), mpb.WithOutput(os.Stderr))
bar = pbs.AddBar(int64(len(files)),
mpb.PrependDecorators(
decor.Name("processed files: ", decor.WC{W: len("processed files: "), C: decor.DindentRight}),
decor.Name("", decor.WCSyncSpaceR),
decor.CountersNoUnit("%d / %d", decor.WCSyncWidth),
),
mpb.AppendDecorators(
decor.Name("ETA: ", decor.WC{W: len("ETA: ")}),
decor.EwmaETA(decor.ET_STYLE_GO, 10),
decor.OnComplete(decor.Name(""), ". done"),
),
)
chDuration = make(chan time.Duration, opt.NumCPUs)
doneDuration = make(chan int)
go func() {
for t := range chDuration {
bar.EwmaIncrBy(1, t)
}
doneDuration <- 1
}()
}
// jobs
}
mpb version 8.7.0
In my function
xxx
, I created a progress bar with 128K jobs. Each job updated durations, while some (tens) of jobs sent duration oftime.Duration(0)
(my bad, I'll try with 1 ms). And the functionxxx
was run multiple times. While after the 6th run (3 hours later), some runtime happened (see 2nd code block), which looks related to `mpb.The app was tested with other small datasets, and everything was fine.
I just updated it to v8.7.2 and run again, I'll report tomorrow.