Skip to content

Commit

Permalink
cmd/bench: run go tests 6 times
Browse files Browse the repository at this point in the history
benchstat wants 95% CI by default, which requires at least 6 samples.

Change-Id: I250255b4d7860892de330e31269184b5e97bc7a6
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/623641
Reviewed-by: Michael Knyszek <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
prattmic committed Nov 1, 2024
1 parent 70f791b commit 1dfa65a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/bench/gotest.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func goTest(tcs []*toolchain) error {
for _, tc := range tcs {
log.Printf("Running Go test benchmarks for %s", tc.Name)
fmt.Printf("toolchain: %s\n", tc.Name)
err := tc.Do("", "test", "-v", "-run=none", "-short", "-bench=.", "-count=5", "golang.org/x/benchmarks/...")
err := tc.Do("", "test", "-v", "-run=none", "-short", "-bench=.", "-count=6", "golang.org/x/benchmarks/...")
if err != nil {
return fmt.Errorf("error running gotest with toolchain %s: %w", tc.Name, err)
}
Expand Down Expand Up @@ -68,7 +68,7 @@ func goTestSubrepo(tc *toolchain, subRepo, baselineDir, experimentDir string) er
fmt.Printf("toolchain: %s\n", test.name) // set the toolchain tag

goplsPath := filepath.Join(test.goplsDir, "gopls")
err = tc.Do(benchmarkDir, "test", "-short", "-bench=.", fmt.Sprintf(`-gopls_path=%s`, goplsPath), "-count=5", "-timeout=180m")
err = tc.Do(benchmarkDir, "test", "-short", "-bench=.", fmt.Sprintf(`-gopls_path=%s`, goplsPath), "-count=6", "-timeout=180m")
if err != nil {
return fmt.Errorf("error running sub-repo %s benchmark %q with toolchain %s in dir %s: %w", subRepo, test.name, tc.Name, benchmarkDir, err)
}
Expand Down

0 comments on commit 1dfa65a

Please sign in to comment.