-
Notifications
You must be signed in to change notification settings - Fork 305
language: fix TestBestMatchAlloc test #23
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
Conversation
The test calls testing.AllocsPerRun with a count of 1. AllocsPerRun sets runtime.GOMAXPROCS to 1, but it doesn't prevent the runtime from descheduling a goroutine and performing an allocation somewhere in the background. This commit changes the test to use a number of runs large enough to average away the occasional noisy allocation. Fixes golang/go#45809
This PR (HEAD: 1606b69) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/text/+/321737 to see it. Tip: You can toggle comments from me using the |
Message from Go Bot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/321737. |
Message from Deepak S: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/321737. |
Message from Ian Lance Taylor: Patch Set 1: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/321737. |
Message from Go Bot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/321737. |
Message from Go Bot: Patch Set 1: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/321737. |
Message from Bryan C. Mills: Patch Set 1: Run-TryBot+1 Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/321737. |
Message from Michael Knyszek: Patch Set 1: Trust+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/321737. |
AllocsPerRun sets runtime.GOMAXPROCS to 1, but it doesn't prevent the runtime from descheduling a goroutine and performing an allocation somewhere in the background. This commit changes the test to use a number of runs large enough to average away the occasional noisy allocation. Fixes golang/go#45809 Change-Id: Ibf904016d0c067740469c8e861079611440222a1 GitHub-Last-Rev: 1606b69 GitHub-Pull-Request: #23 Reviewed-on: https://go-review.googlesource.com/c/text/+/321737 Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Michael Knyszek <mknyszek@google.com>
Message from Bryan C. Mills: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/321737. |
This PR is being closed because golang.org/cl/321737 has been merged. |
Thanks for merging! :) |
AllocsPerRun sets runtime.GOMAXPROCS to 1, but it doesn't prevent the runtime from descheduling a goroutine and performing an allocation somewhere in the background. This commit changes the test to use a number of runs large enough to average away the occasional noisy allocation. Fixes golang/go#45809 Change-Id: Ibf904016d0c067740469c8e861079611440222a1 GitHub-Last-Rev: 1606b69 GitHub-Pull-Request: golang#23 Reviewed-on: https://go-review.googlesource.com/c/text/+/321737 Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Michael Knyszek <mknyszek@google.com>
The test calls testing.AllocsPerRun with a count of 1.
AllocsPerRun sets runtime.GOMAXPROCS to 1, but it doesn't prevent the runtime from descheduling a goroutine
and performing an allocation somewhere in the background.
This commit changes the test to use a number of runs large enough to average away the occasional noisy allocation.
Fixes golang/go#45809