diff options
Diffstat (limited to 'libgo/go/exp/html/parse_test.go')
-rw-r--r-- | libgo/go/exp/html/parse_test.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libgo/go/exp/html/parse_test.go b/libgo/go/exp/html/parse_test.go index 7cf2ff4163e..4896dfb7a0f 100644 --- a/libgo/go/exp/html/parse_test.go +++ b/libgo/go/exp/html/parse_test.go @@ -382,15 +382,9 @@ func BenchmarkParser(b *testing.B) { } 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++ { Parse(bytes.NewBuffer(buf)) } - b.StopTimer() - runtime.ReadMemStats(&ms) - mallocs = ms.Mallocs - mallocs - b.Logf("%d iterations, %d mallocs per iteration\n", b.N, int(mallocs)/b.N) } |