testing: support underscore separators in -benchtime counts #60176
Labels
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go test -bench=. -benchtime=40_000x
, because I found that easier to read than-benchtime=40000x
.What did you expect to see?
It should work the same with or without underscores, like numeric literals in Go code.
What did you see instead?
This appears to be because we call
strconv.ParseInt
withbase = 10
, and the API is documented to only support underscore separators withbase = 0
. Slightly unfortunate if we don't want to support other bases like-benchtime=0x123
, but I guess they're not harmful either.The text was updated successfully, but these errors were encountered: