diff options
Diffstat (limited to 'src/pkg/exp/html/parse_test.go')
| -rw-r--r-- | src/pkg/exp/html/parse_test.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/pkg/exp/html/parse_test.go b/src/pkg/exp/html/parse_test.go index 7cf2ff4163..4896dfb7a0 100644 --- a/src/pkg/exp/html/parse_test.go +++ b/src/pkg/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) } |
