From 727e5ce95fe11653b4ba197771173c80359bdada Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Wed, 3 Oct 2012 11:41:18 +0800 Subject: [PATCH] testing: update package docs to use ResetTimer() instead of StopTimer/StartTimer() R=golang-dev, rsc, r CC=golang-dev https://golang.org/cl/6591051 --- src/pkg/testing/testing.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go index 66d26b8ad8..b30505d76a 100644 --- a/src/pkg/testing/testing.go +++ b/src/pkg/testing/testing.go @@ -27,15 +27,14 @@ // // The benchmark package will vary b.N until the benchmark function lasts // long enough to be timed reliably. The output -// testing.BenchmarkHello 10000000 282 ns/op +// BenchmarkHello 10000000 282 ns/op // means that the loop ran 10000000 times at a speed of 282 ns per loop. // // If a benchmark needs some expensive setup before running, the timer -// may be stopped: +// may be reset: // func BenchmarkBigLen(b *testing.B) { -// b.StopTimer() // big := NewBig() -// b.StartTimer() +// b.ResetTimer() // for i := 0; i < b.N; i++ { // big.Len() // }