add benchmark for all marshal functions

This commit is contained in:
Joel Wetzell
2026-05-30 10:54:20 -05:00
parent 968ad64521
commit bd47dddb58
8 changed files with 88 additions and 0 deletions
+11
View File
@@ -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)
}
}
}