Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix undefined conversion #117544

Merged
merged 1 commit into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ func TestDifferentFlowsExpectEqual(t *testing.T) {
}.exercise(t)
}

// TestSeatSecondsRollover checks that there is not a problem with SeatSecons overflow.
// TestSeatSecondsRollover checks that there is not a problem with SeatSeconds overflow.
func TestSeatSecondsRollover(t *testing.T) {
metrics.Register()
now := time.Now()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const MinSeatSeconds = SeatSeconds(0)
// This is intended only to produce small values, increments in work
// rather than amount of work done since process start.
func SeatsTimesDuration(seats float64, duration time.Duration) SeatSeconds {
return SeatSeconds(math.Round(seats * float64(duration/time.Nanosecond) / (1e9 / ssScale)))
return SeatSeconds(int64(math.Round(seats * float64(duration/time.Nanosecond) / (1e9 / ssScale))))
}

// ToFloat converts to a floating-point representation.
Expand Down