wgengine/bench: close Engines on benchmark completion

This reduces the speed with which these benchmarks exhaust their supply fds.
Not to zero unfortunately, but it's still helpful when doing long runs.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder
2021-05-07 12:53:11 -07:00
committed by Josh Bleecher Snyder
parent e9066ee625
commit 6618e82ba2
3 changed files with 10 additions and 3 deletions

View File

@ -43,7 +43,7 @@ func BenchmarkBatchTCP(b *testing.B) {
func BenchmarkWireGuardTest(b *testing.B) {
run(b, func(logf logger.Logf, traf *TrafficGen) {
setupWGTest(logf, traf, Addr1, Addr2)
setupWGTest(b, logf, traf, Addr1, Addr2)
})
}