mirror of
https://github.com/jwetzell/artnet-go.git
synced 2026-08-20 14:18:58 +00:00
add benchmark for all marshal functions
This commit is contained in:
@@ -30,3 +30,14 @@ func TestGoodArtPollReplyUnmarshal(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkArtPollReplyMarshalBinary(b *testing.B) {
|
||||
data := artnet.ArtPollReply{}
|
||||
|
||||
for b.Loop() {
|
||||
_, err := data.MarshalBinary()
|
||||
if err != nil {
|
||||
b.Fatalf("failed to encode ArtPollReply: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user