gomonop/pkg/perfdata/units.go

21 lines
433 B
Go
Raw Permalink Normal View History

package perfdata // import nocternity.net/gomonop/pkg/perfdata
// Units of measurement, which may be used to qualify the performance data.
type UnitOfMeasurement int
const (
UomNone UnitOfMeasurement = iota
UomSeconds
UomPercent
UomBytes
UomKilobytes
UomMegabytes
UomGigabytes
UomTerabytes
UomCounter
)
func (u UnitOfMeasurement) String() string {
return [...]string{"", "s", "%", "B", "KB", "MB", "GB", "TB", "c"}[u]
}