vimeo / graph-explorer

A graphite dashboard powered by structured metrics
http://vimeo.github.io/graph-explorer/
Apache License 2.0
1.06k stars 93 forks source link

don't force scaling prefixes in units #73

Closed thepaul closed 10 years ago

thepaul commented 10 years ago

this was accomplished by making the unitconv code a little more general, so that it distinguishes between a "base unit" (the unit without any scaling prefixes) and a "primary unit" (the unit with any time or storage size components downsized to their most basic equivalents, e.g. seconds or bits). the "base unit" is what the graph will get.

also, move most of the unitconv doctests into real unittest classes; they were starting to try and be too complete and too long to be nice doctests.

fixes #69.