testing: run first benchmark with last value from -cpu list GOMAXPROCS value #49980
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
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?
I wrote a simple function for matrix multiplication with gorutines:
Also, I wrote a benchmark test for this function:
And I want to run it with command:
What did you expect to see?
It looks like that first benchmark runs with 4 threads except 1 (as I expected). And so the results of first and last benchmarks are the same.
I suppose it happens because my benchmark takes long time, so it executes only one time (if I make size of the matrices smaller it would execute several times and results will be correct). It's probably happens because here:
In runTests GOMAXPROCS set in cycle. But in the first run of benchmarks, GOMAXPROCS is'n changed.
What did you see instead?
The text was updated successfully, but these errors were encountered: