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

bench/rttanalysis: allow roundtrips to be off by 1 #74111

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

ajwerner
Copy link
Contributor

If we don't have a range, let the currently estimate be wrong by 1.
We mostly care about the ballpark and the growth rate. I'm sick of
these flakes.

Fixes #73884.

Release note: None

@ajwerner ajwerner requested review from RichardJCai, a team and rafiss December 21, 2021 00:09
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@chengxiong-ruan chengxiong-ruan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rafiss and @RichardJCai)

@@ -319,7 +319,9 @@ func (b benchmarkExpectations) find(name string) (benchmarkExpectation, bool) {
}

func (e benchmarkExpectation) matches(roundTrips int) bool {
return e.min <= roundTrips && roundTrips <= e.max
return (e.min <= roundTrips && roundTrips <= e.max) ||
e.min == e.max &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would

(e.min <= roundTrips && roundTrips <= e.max) || (e.min == e.max && (roundTrips == e.min-1 || roundTrips == e.min+1))

be even more clear?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I unwrapped it one level and added commentary

If we don't have a range, let the currently estimate be wrong by 1.
We mostly care about the ballpark and the growth rate. I'm sick of
these flakes.

Fixes cockroachdb#73884.

Release note: None
@ajwerner ajwerner force-pushed the ajwerner/deflake-rttanalysis branch from f8283b3 to 0750472 Compare December 21, 2021 16:37
Copy link
Collaborator

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please

@ajwerner
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Dec 21, 2021

Build succeeded:

@craig craig bot merged commit 779f08b into cockroachdb:master Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bench/rttanalysis: TestBenchmarkExpectation failed
5 participants