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