]> Cypherpunks repositories - gostls13.git/commit
testing: improve B.Loop docs, use B.Loop in examples
authorAustin Clements <austin@google.com>
Thu, 12 Dec 2024 20:43:37 +0000 (15:43 -0500)
committerGopher Robot <gobot@golang.org>
Mon, 16 Dec 2024 05:41:19 +0000 (21:41 -0800)
commit090748d6c7973e9bb8f5efe069135c8ea0f0d89c
tree00936118503d506c20c88f0167451517e8297e8f
parente39e965e0e0cce65ca977fd0da35f5bfb68dc2b8
testing: improve B.Loop docs, use B.Loop in examples

This updates the testing documentation to frame B.Loop as the
canonical way to write benchmarks. We retain documentation on b.N
benchmarks because people will definitely continue to see them (and
write them), but it's demoted to clearly second class.

This also attempts to clarify and refine the B.Loop documentation
itself.

Updates #61515
Fixes #70787

Change-Id: If5123435bfe3a5883a753119ecdf7bbc41afd499
Reviewed-on: https://go-review.googlesource.com/c/go/+/635895
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Caleb Spare <cespare@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Austin Clements <austin@google.com>
src/testing/benchmark.go
src/testing/benchmark_test.go
src/testing/testing.go