Codebase list golang-github-vbauerster-mpb / f0cc34d
use SizeB1024 as unit Vladimir Bauer 3 years ago
2 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
1313
1414 // new bar with 'trigger complete event' disabled, because total is zero
1515 bar := p.AddBar(0,
16 mpb.PrependDecorators(decor.Counters(decor.UnitKiB, "% .1f / % .1f")),
16 mpb.PrependDecorators(decor.Counters(decor.SizeB1024(0), "% .1f / % .1f")),
1717 mpb.AppendDecorators(decor.Percentage()),
1818 )
1919
2121 bar := p.New(total,
2222 mpb.BarStyle().Rbound("|"),
2323 mpb.PrependDecorators(
24 decor.CountersKibiByte("% .2f / % .2f"),
24 decor.Counters(decor.SizeB1024(0), "% .2f / % .2f"),
2525 ),
2626 mpb.AppendDecorators(
2727 decor.EwmaETA(decor.ET_STYLE_GO, 90),
2828 decor.Name(" ] "),
29 decor.EwmaSpeed(decor.UnitKiB, "% .2f", 60),
29 decor.EwmaSpeed(decor.SizeB1024(0), "% .2f", 60),
3030 ),
3131 )
3232