console
console copied to clipboard
Reduce the number of digits shown in UI
It probably doesn't make much sense to include fractions in the numbers displayed in the UI.
ref: https://news.ycombinator.com/item?id=29596537
I think we probably do want one or two fractional digits, at least for larger units like seconds, but definitely not 4 like we have currently.
Can we just vary the fraction so that we aim for 3 significant figures total when the non-fractional part is less than 1000? (And when its >= 1000, then the fractional part should be hidden.)
Is that the wrong way to look at this?
not directly related, but we probably also want to format durations over one or two minutes as minutes + seconds, rather than as a large number of seconds, which it looks like std::time::Duration's fmt::Debug implementation doesn't do. So, at some point, we're definitely going to end up writing our own duration formatter, and we can probably implement significant figures logic there as well?
I think we probably do want one or two fractional digits, at least for larger units like seconds, but definitely not 4 like we have currently.
Depends... 5m20s maybe, but 3.245ms... probably not. I think 3ms would make more sense there.