Skip to content

Commit

Permalink
Stop converting nanosecond metrics (#1322)
Browse files Browse the repository at this point in the history
  • Loading branch information
dricross authored Sep 3, 2024
1 parent c54432d commit c79d9bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/cloudwatch/unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()},
Expand Down
2 changes: 1 addition & 1 deletion internal/cloudwatch/unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit c79d9bc

Please sign in to comment.