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