diff options
Diffstat (limited to 'libgo/go/exp/html/token_test.go')
-rw-r--r-- | libgo/go/exp/html/token_test.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libgo/go/exp/html/token_test.go b/libgo/go/exp/html/token_test.go index 63a8bfc4834..14e23467f49 100644 --- a/libgo/go/exp/html/token_test.go +++ b/libgo/go/exp/html/token_test.go @@ -634,9 +634,7 @@ func benchmarkTokenizer(b *testing.B, level int) { } b.SetBytes(int64(len(buf))) runtime.GC() - var ms runtime.MemStats - runtime.ReadMemStats(&ms) - mallocs := ms.Mallocs + b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { z := NewTokenizer(bytes.NewBuffer(buf)) @@ -674,10 +672,6 @@ func benchmarkTokenizer(b *testing.B, level int) { } } } - b.StopTimer() - runtime.ReadMemStats(&ms) - mallocs = ms.Mallocs - mallocs - b.Logf("%d iterations, %d mallocs per iteration\n", b.N, int(mallocs)/b.N) } func BenchmarkRawLevelTokenizer(b *testing.B) { benchmarkTokenizer(b, rawLevel) } |