aboutsummaryrefslogtreecommitdiff
path: root/src/testing/benchmark.go
diff options
context:
space:
mode:
authorJoe Tsai <thebrokentoaster@gmail.com>2016-12-08 07:13:50 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-12-09 04:04:11 +0000
commit4bf7d1e722e852f4a28d1898cbe5d0a0d505763b (patch)
tree02cc41940ec538b2990fce2411f118153cf2b8c2 /src/testing/benchmark.go
parente12ce1e4005fcefd7a3537c433e6a60044160086 (diff)
downloadgo-4bf7d1e722e852f4a28d1898cbe5d0a0d505763b.tar.xz
Revert "testing: add T.Context method"
This reverts commit 26827bc2fe4c80dc68b3793631d24975425c9467. Fixes #18199 Change-Id: I42e292cb4e3d740a4fbb5d0380c6ee15ac742092 Reviewed-on: https://go-review.googlesource.com/34141 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/testing/benchmark.go')
-rw-r--r--src/testing/benchmark.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/testing/benchmark.go b/src/testing/benchmark.go
index b1c6d2eff0..c033ce5fec 100644
--- a/src/testing/benchmark.go
+++ b/src/testing/benchmark.go
@@ -5,7 +5,6 @@
package testing
import (
- "context"
"flag"
"fmt"
"internal/race"
@@ -128,9 +127,6 @@ func (b *B) nsPerOp() int64 {
// runN runs a single benchmark for the specified number of iterations.
func (b *B) runN(n int) {
- b.ctx, b.cancel = context.WithCancel(b.parentContext())
- defer b.cancel()
-
benchmarkLock.Lock()
defer benchmarkLock.Unlock()
// Try to get a comparable environment for each run