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
@@ -150,3 +150,15 @@ func TestBadMIDIMessageUnpack(t *testing.T) {
})
}
}
func BenchmarkMIDIMessageUnpack(b *testing.B) {
processorInstance := processor.MIDIMessageUnpack{}
payload := midi.NoteOn(1, 60, 127)
for b.Loop() {
_, err := processorInstance.Process(b.Context(), common.WrappedPayload{Payload: payload})
if err != nil {
b.Fatalf("midi.message.unpack processing failed: %s", err)
}
}
}