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