add basic benchmark for most processors

This commit is contained in:
Joel Wetzell
2026-05-14 19:44:19 -05:00
parent fa4997ba78
commit 9eb05c8360
43 changed files with 1085 additions and 12 deletions
@@ -112,3 +112,23 @@ func TestBadOSCMessageEncode(t *testing.T) {
})
}
}
func BenchmarkOSCMessageEncode(b *testing.B) {
processorInstance := processor.OSCMessageEncode{}
payload := &osc.OSCMessage{
Address: "/test",
Args: []osc.OSCArg{
{
Type: "i",
Value: int32(42),
},
},
}
for b.Loop() {
_, err := processorInstance.Process(b.Context(), common.WrappedPayload{Payload: payload})
if err != nil {
b.Fatalf("osc.message.encode processing failed: %s", err)
}
}
}