Open jazzzz opened 6 years ago
I guess an initial implementation of this could be as simple as defining an optional format string in Python syntax? So a value of 13252352.304 and format string of %.2e
would result in 1.33e+07
.
A format string would be better than nothing, but it's still harder to read "13252352" against "3 hours, 40 minutes, 52.352 seconds".
Point taken - what would be the most important types then in your opinion?
In terms of otherwise unreadable, I guess:
Other units seem like they are less of an issue to me.
This would cover most (if not all) my needs!
You're considering to add support of user controlled format strings, right? I would like to point out potential security implications, e.g. when using .format
: http://lucumr.pocoo.org/2016/12/29/careful-with-str-format/.
For large values, Cabot status messages can be hard to read (like "16360927232.0 < 100000000000.0"). It would be nice to set a unit to the checked metrics and use it to humanize displayed values (like Grafana for example).