const classjig::StatusBar
sys::Obj jig::StatusBar
StatusBar renders the single line progress display.
- bar
static Str bar(Int done, Int total)Bar of
barSizecells with eighth-cell partial blocks.- barSize
const static Int barSize := 20Width of the progress bar in cells.
- fmtBarDur
static Str fmtBarDur(Duration d)Format status bar clock as
12.3sec, then3min 10.4sec; tenths are truncated so the clock never jumps ahead.- fmtDur
Format duration as
12.3sec, or2min 5seconce past 59sec.- fmtDurMs
static Str fmtDurMs(Duration d)Format duration as
4900msunder 5sec,7.2secunder 1min, then2min 5sec; rounded to nearest tenth or whole second.- render
static Str render(Int total, Int passed, Int failed, Str? label, Duration elapsed, Int width, Bool color := true)Render status line to fit within
widthcolumns:[█▏░░░░] 6% 80/1324 | ✓ 80 4.8sec | core [79/149]
If the line is too wide the label is clipped from the left or dropped first, then the time.