]> Cypherpunks repositories - gostls13.git/commit
testing: with -benchtime=1x, run the benchmark loop exactly once
authorCaleb Spare <cespare@gmail.com>
Fri, 25 Jun 2021 20:40:30 +0000 (13:40 -0700)
committerEmmanuel Odeke <emmanuel@orijtech.com>
Thu, 7 Oct 2021 21:46:33 +0000 (21:46 +0000)
commitb69f823ece741f21d06591657f4e0a5b17d492e3
tree988dda7015bc3824a9fcca56e80d699366e13eab
parent6b4cf2be9385ea25fed011f7c862d9e023b71df6
testing: with -benchtime=1x, run the benchmark loop exactly once

Like with -benchtime=1ns, if we find that the "discovery" round (run1)
has already crossed the -benchtime threshold, we skip running more
iterations.

Fixes #32051

Change-Id: I76aaef2ba521ba8ad6bbde2b14977e191aada5e4
Reviewed-on: https://go-review.googlesource.com/c/go/+/331089
Trust: Caleb Spare <cespare@gmail.com>
Run-TryBot: Caleb Spare <cespare@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
src/cmd/go/testdata/script/test_benchmark_1x.txt [new file with mode: 0644]
src/testing/benchmark.go