diff options
| author | Junyang Shao <shaojunyang@google.com> | 2024-11-21 07:36:25 +0000 |
|---|---|---|
| committer | Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-11-21 22:09:32 +0000 |
| commit | 154fb4e1d45e503658542dee5296243a6146e7ca (patch) | |
| tree | 213336d17b34a5ffacf334d4afc34e6934e1c414 /src/testing/testing_test.go | |
| parent | 0c6dbd99c570874ef5ec353298708677c1675dd0 (diff) | |
| download | go-154fb4e1d45e503658542dee5296243a6146e7ca.tar.xz | |
testing: Update testing.B.Loop to save benchmark results.
This is fixing some the missing logic of CL 627755.
Change-Id: I35acffef7299331fce21da4a80a26185b2e909f4
Reviewed-on: https://go-review.googlesource.com/c/go/+/630455
Commit-Queue: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/testing/testing_test.go')
| -rw-r--r-- | src/testing/testing_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testing/testing_test.go b/src/testing/testing_test.go index 4bf6378782..1e32a1e615 100644 --- a/src/testing/testing_test.go +++ b/src/testing/testing_test.go @@ -989,6 +989,11 @@ func TestBenchmarkBLoopIterationCorrect(t *testing.T) { if c != want { t.Errorf("got %d loop rampup; want %d", c, want) } + + re := regexp.MustCompile(`BenchmarkBLoopPrint-[0-9]+\s*2\s*[0-9]+\s*ns/op.*`) + if !re.Match(out) { + t.Errorf("Missing benchmark output") + } } func TestBenchmarkBNIterationCorrect(t *testing.T) { |
