go/src/testing
Eddie Lopez cecaa25bd3 testing: add an example showcasing B.RunParallel with B.ReportMetric
This commit was dedicated to adding an example of using B.ReportMetrics
with B.RunParallel called ExampleB_ReportMetric_parallel. In this
example, the same algorithm for ExampleB_ReportMetric was used, instead
with a concurrent for loop using PB.Next instead of a standard one.
There is also notes noting when to use the B.ReportMetric methods when
running concurrent testing.

Fixes #50756
Change-Id: I2a621b4e367af5f4ec47d38a0da1035a8d52f628
Reviewed-on: https://go-review.googlesource.com/c/go/+/437815
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
2022-10-07 17:49:17 +00:00
..
fstest
internal/testdeps
iotest testing: use strings.Builder 2022-09-07 07:03:10 +00:00
quick all: gofmt main repo 2022-04-11 16:34:30 +00:00
allocs.go
allocs_test.go
benchmark.go cmd/go, testing: add go test -skip flag 2022-09-16 14:48:54 +00:00
benchmark_test.go testing: add an example showcasing B.RunParallel with B.ReportMetric 2022-10-07 17:49:17 +00:00
cover.go cmd/go: support new hybrid coverage instrumentation 2022-09-28 11:50:58 +00:00
example.go
export_test.go
fuzz.go cmd/go, testing: add go test -skip flag 2022-09-16 14:48:54 +00:00
helper_test.go cmd/go, testing: add go test -skip flag 2022-09-16 14:48:54 +00:00
helperfuncs_test.go cmd/compile: mark closures made for generic function expressions as wrappers 2022-05-26 21:06:31 +00:00
match.go cmd/go, testing: add go test -skip flag 2022-09-16 14:48:54 +00:00
match_test.go cmd/go, testing: add go test -skip flag 2022-09-16 14:48:54 +00:00
newcover.go runtime/coverage: improve unit tests 2022-09-29 14:13:26 +00:00
panic_test.go
run_example.go
run_example_js.go all: use io.Seek* instead of deprecated os.SEEK_* 2022-08-08 17:01:54 +00:00
sub_test.go cmd/go, testing: add go test -skip flag 2022-09-16 14:48:54 +00:00
testing.go testing: update description of Setenv 2022-09-29 22:16:42 +00:00
testing_other.go
testing_test.go testing: fail if T.Setenv is called via T.Run in a parallel test 2022-09-28 17:18:17 +00:00
testing_windows.go