Skip to content

Commit

Permalink
convert mb limit to bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavDhulipala committed Jul 10, 2024
1 parent fd6f539 commit caf6015
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 caf6015

Please sign in to comment.