Klemens Nanni wrote: > On Sat, Oct 12, 2019 at 05:38:13PM -0500, Scott Cheloha wrote: > > Also, just count how many spaces we need to print ncpuonline, > > then use that when printing the individual CPU lines. > Yup, here's a minimal diff that does that without additional buffers and > globals but a single local static padding; it's definition looks lengthy > but that's what makes it nicely obvious (imho). > > Only downside compared to your diff is that we still assume machines to > have less than 1000 cores, that is keep combined stats at fixed "%-3d", > but that seems fairly acceptable to me.
looks nicer and manages to remove more lines than it adds. :)