]> Cypherpunks.ru repositories - gostls13.git/commit
testing: add Elapsed method to testing.B
authorhopehook <hopehook.com@gmail.com>
Sat, 30 Jul 2022 04:47:51 +0000 (12:47 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 25 Aug 2022 17:58:32 +0000 (17:58 +0000)
commit396b153ec454cd427f97be4d994a903e2c4b244f
tree2c95f827e57b82b7620aed67c2f69238d1a488cf
parent83b5fe63514411f425061967fd8c1d506f2ac40f
testing: add Elapsed method to testing.B

Elapsed returns the measured elapsed time of the benchmark,
but does not change the running state of the timer.

Fixes #43620.

Change-Id: Idd9f64c4632518eec759d2ffccbf0050d84fcc03
Reviewed-on: https://go-review.googlesource.com/c/go/+/420254
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: hopehook <hopehook@qq.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
api/next/43620.txt [new file with mode: 0644]
src/testing/benchmark.go
src/testing/benchmark_test.go