You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran go test -race. Noticed that the test run took a full second longer with the race detector compared with go test.
What did you expect to see?
I expected tests run with and without the race detector to complete in roughly the same amount of time.
What did you see instead?
With Go 1.21:
$ time go test -count=1
PASS
ok github.com/mdwhatcott/version 0.089s
go test -count=1 0.18s user 0.25s system 170% cpu 0.252 total
$ time go test -count=1 -race
PASS
ok github.com/mdwhatcott/version 1.157s
go test -count=1 -race 0.21s user 0.25s system 31% cpu 1.438 total
With Go 1.20.7
$ time go test -count=1
PASS
ok github.com/mdwhatcott/version 0.094s
go test -count=1 0.19s user 0.24s system 171% cpu 0.248 total
$ time go test -count=1 -race
PASS
ok github.com/mdwhatcott/version 0.116s
go test -count=1 -race 0.21s user 0.26s system 156% cpu 0.303 total
The text was updated successfully, but these errors were encountered:
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?
Ran
go test -race
. Noticed that the test run took a full second longer with the race detector compared withgo test
.What did you expect to see?
I expected tests run with and without the race detector to complete in roughly the same amount of time.
What did you see instead?
With Go 1.21:
With Go 1.20.7
The text was updated successfully, but these errors were encountered: