types/wgkey: add BenchmarkShortString

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder 2021-05-07 21:38:18 -07:00 committed by Josh Bleecher Snyder
parent 3173c5a65c
commit 7cd4766d5e

View File

@ -171,3 +171,13 @@ func BenchmarkUnmarshalJSON(b *testing.B) {
}
}
}
var sinkString string
func BenchmarkShortString(b *testing.B) {
b.ReportAllocs()
var k Key
for i := 0; i < b.N; i++ {
sinkString = k.ShortString()
}
}