0
1
mirror of https://github.com/golang/go synced 2025-04-20 01:10:30 +00:00

testing: improve documentation, examples, release notes for

testing.b.Loop.

This CL added documentation of the no-inlining semantic of b.Loop, with
a concrete example. This CL also tries to improve the release note to be
more descriptive.

Fixes 

Change-Id: I1e13cc92d5d6bdbf40fb44f44475e249747b807f
Reviewed-on: https://go-review.googlesource.com/c/go/+/633536
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Junyang Shao
2024-12-04 20:11:18 +00:00
committed by Go LUCI
parent 32e19fc439
commit 5213e1e56c
4 changed files with 52 additions and 1 deletions
doc/next/6-stdlib
src/testing

@ -1 +1 @@
Benchmarks can use the new [B.Loop] method in `for b.Loop() { ... }` loops to determine if iteration should continue.
<!-- testing.B.Loop mentioned in 6-stdlib/6-testing-bloop.md. -->