Skip to content

Commit

Permalink
[exporter/limits] bug-fix limit mb conversion (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavDhulipala authored Jul 10, 2024
1 parent fd6f539 commit 3f7a7a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exporter/limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (acf *AccountCsvFetcher) fetchFromCli() ([]AccountLimitMetric, error) {
slog.Error("failed to scrape account metric mem string %s", mem)
acf.errorCounter.Inc()
} else {
metric.Mem = memMb * 1000
metric.Mem = memMb * 1e6
}
}
if cpu != "" {
Expand Down
2 changes: 1 addition & 1 deletion exporter/limits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestAccountLimitFetch(t *testing.T) {
account1Limit := accountLimits[0]
assert.Equal(account1Limit.Account, "account1")
assert.Equal(account1Limit.CPU, 964.)
assert.Equal(account1Limit.Mem, 15468557.*1000)
assert.Equal(account1Limit.Mem, 15468557.*1e6)
}

func TestNewLimitCollector(t *testing.T) {
Expand Down

0 comments on commit 3f7a7a0

Please sign in to comment.