diff --git a/internal/cloudwatch/unit.go b/internal/cloudwatch/unit.go index 284d5c1b4a..478034e3ec 100644 --- a/internal/cloudwatch/unit.go +++ b/internal/cloudwatch/unit.go @@ -40,7 +40,7 @@ var uniqueConversions = map[string]struct { scale float64 }{ // time - "ns": {types.StandardUnitMicroseconds, 1 / float64(time.Microsecond.Nanoseconds())}, + "ns": {types.StandardUnitNone, 1}, "min": {types.StandardUnitSeconds, time.Minute.Seconds()}, "h": {types.StandardUnitSeconds, time.Hour.Seconds()}, "d": {types.StandardUnitSeconds, 24 * time.Hour.Seconds()}, diff --git a/internal/cloudwatch/unit_test.go b/internal/cloudwatch/unit_test.go index cb808f5d0b..8bc1c3ea4f 100644 --- a/internal/cloudwatch/unit_test.go +++ b/internal/cloudwatch/unit_test.go @@ -56,7 +56,7 @@ func TestScaledUnits(t *testing.T) { {"kB", "Kilobytes", 1}, {"kib/s", "Kilobytes/Second", 1.024}, {"ms", "Milliseconds", 1}, - {"ns", "Microseconds", 0.001}, + {"ns", "None", 1}, {"min", "Seconds", 60}, {"h", "Seconds", 60 * 60}, {"d", "Seconds", 24 * 60 * 60},