Rename some functions and fix tests accordingly. Fix README

This commit is contained in:
Thomas Roehl
2022-03-18 14:09:35 +01:00
parent 70cc2cbe8e
commit 92a0c64422
3 changed files with 98 additions and 20 deletions

View File

@@ -14,7 +14,7 @@ type Unit interface {
Valid() bool
String() string
Short() string
AddDivisorUnit(div Measure)
AddUnitDenominator(div Measure)
}
```
@@ -69,7 +69,7 @@ if err == nil {
value, ok := metric.GetField("value")
if ok {
out_unit = NewUnit(in_unit)
out_unit.AddDivisorUnit("seconds")
out_unit.AddUnitDenominator("seconds")
seconds := timeDiff.Seconds()
y, err := lp.New(metric.Name()+"_bw",
metric.Tags(),