mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-28 12:02:23 +00:00
types/wgkey: add BenchmarkShortString
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
3173c5a65c
commit
7cd4766d5e
@ -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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user