all: add (*testing.B).ReportAllocs() to every benchmark

This ensures that we can properly track and catch allocation
slippages that could otherwise have been missed.

Fixes #2748
This commit is contained in:
Emmanuel T Odeke
2021-08-30 20:43:18 -07:00
committed by Brad Fitzpatrick
parent 44d71d1e42
commit 0daa32943e
7 changed files with 19 additions and 1 deletions

View File

@@ -397,6 +397,7 @@ func TestClose(t *testing.T) {
}
func BenchmarkWrite(b *testing.B) {
b.ReportAllocs()
ftun, tun := newFakeTUN(b.Logf, true)
defer tun.Close()