diff --git a/package.json b/package.json index 5b4a411..c87b15c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@troed/oc-ls-stats", - "version": "0.0.54", + "version": "0.0.55", "type": "module", "exports": { "./tui": { diff --git a/tui.tsx b/tui.tsx index 28f2540..66ea135 100644 --- a/tui.tsx +++ b/tui.tsx @@ -206,6 +206,11 @@ function pad4(s: string | undefined) { return s.padStart(4, " ") } +function pad3(s: string | undefined) { + if (!s) return "---" + return s.padStart(3, " ") +} + function activeDurationMs(samples: StreamSample[], tailAt?: number) { if (samples.length === 0) return 0 if (samples.length === 1) { @@ -261,7 +266,7 @@ function SessionPromptRight(props: { const pp = prefillRate() const tps = liveTps() const progress = prefillProgress() - const ppLabel = pp ? `PP ${pad4(formatPps(pp))} tps (${pad4(formatPercent(progress))}%)` : `PP ${pad4(undefined)} tps (${pad4(undefined)}%)` + const ppLabel = pp ? `PP ${pad4(formatPps(pp))} tps (${pad3(formatPercent(progress))}%)` : `PP ${pad4(undefined)} tps (${pad3(undefined)}%)` const tpsLabel = tps ? `GEN ${pad4(formatTps(tps))} tps` : `GEN ${pad4(undefined)} tps` return `${ppLabel} | ${tpsLabel}` })