use SizeB1024 as unit
Vladimir Bauer
3 years ago
| 13 | 13 |
|
| 14 | 14 |
// new bar with 'trigger complete event' disabled, because total is zero
|
| 15 | 15 |
bar := p.AddBar(0,
|
| 16 | |
mpb.PrependDecorators(decor.Counters(decor.UnitKiB, "% .1f / % .1f")),
|
|
16 |
mpb.PrependDecorators(decor.Counters(decor.SizeB1024(0), "% .1f / % .1f")),
|
| 17 | 17 |
mpb.AppendDecorators(decor.Percentage()),
|
| 18 | 18 |
)
|
| 19 | 19 |
|
| 21 | 21 |
bar := p.New(total,
|
| 22 | 22 |
mpb.BarStyle().Rbound("|"),
|
| 23 | 23 |
mpb.PrependDecorators(
|
| 24 | |
decor.CountersKibiByte("% .2f / % .2f"),
|
|
24 |
decor.Counters(decor.SizeB1024(0), "% .2f / % .2f"),
|
| 25 | 25 |
),
|
| 26 | 26 |
mpb.AppendDecorators(
|
| 27 | 27 |
decor.EwmaETA(decor.ET_STYLE_GO, 90),
|
| 28 | 28 |
decor.Name(" ] "),
|
| 29 | |
decor.EwmaSpeed(decor.UnitKiB, "% .2f", 60),
|
|
29 |
decor.EwmaSpeed(decor.SizeB1024(0), "% .2f", 60),
|
| 30 | 30 |
),
|
| 31 | 31 |
)
|
| 32 | 32 |
|