Skip to content

proposal: testing: reuse the iteration number of the first round when count > 1 #38000

Description

@shawndx

We often run all benchmarks of std packages with -count=5 or higher, it usually takes 5-6 hours to finish on our x86 and arm64 servers, the overall turnaround time might be reduced a lot if we can skip the auto adjustment from round #2 and reuse the iteration number computed before.

With an experimental change I got the following numbers:

                                    old                                 new
package math/big            2865.780s                              2242.640s
package runtime              5936.460s                              4926.073s
package encodng/json     486.691s                                321.370s

I realized same attempt was made before but then dropped due to benchmark regressions reported in #25622, a change to computing the 'grain' value of RunParallel proposed in #37996 shall avoid the regression. Furthermore this feature could be guarded by an option if necessary.

Activity

  1. added this to the Proposal milestone on Mar 22, 2020
  2. moved this to Incoming in Proposalson Aug 10, 2022
  3. seankhliao commented on Nov 28, 2024

    @seankhliao
    Member

    I believe this is now possible with https://pkg.go.dev/testing@master#B.Loop scheduled for go1.24.

  4. locked and limited conversation to collaborators on Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions