-
Notifications
You must be signed in to change notification settings - Fork 18k
benchmark timeout when benchtime set too long #49974
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
This PR (HEAD: b535c98) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/369294 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/369294. |
1. handles overflows 2. add an unit test
1. handles overflows 2. add an unit test
1. handles overflows 2. add an unit test
When benchmark function execute time is very short, set benchtime=5s / 10s / 20s is ok.
But set benchtime=120s will execute time out.
benchtime short
The
B.n
maybe 1 , 100 , 10000, 1000000, 100000000, 100000000 and exist.benchtime long
But set benchtime=120s,
n = goalns * prevIters / prevns
may be overflow(< 0) int64, and theB.n
maybe 1, 100, 10000, 1000000, 100000000, 100000001, 100000002 .... and timeout.