Skip to content

Add JMH benchmarks for FIXMessageEncoder and FIXMessageDecoder#1179

Draft
Copilot wants to merge 1 commit intomasterfrom
copilot/add-jmh-test-for-fix-encoder-decoder
Draft

Add JMH benchmarks for FIXMessageEncoder and FIXMessageDecoder#1179
Copilot wants to merge 1 commit intomasterfrom
copilot/add-jmh-test-for-fix-encoder-decoder

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

Adds FIXMessageCodecPerfTest to the quickfixj-perf-test module to measure encoding/decoding throughput and latency for FIX 4.4 NewOrderSingle, with and without a repeating group.

Benchmarks

  • encodeWithoutGroup / encodeWithGroup — calls FIXMessageEncoder.encode() with a plain NewOrderSingle and one with two NoAllocs (tag 78) entries
  • decodeWithoutGroup / decodeWithGroup — calls FIXMessageDecoder.decode() on a pre-filled IoBuffer; buffer.rewind() resets the read position each iteration (decoder resets to SEEKING_HEADER internally after each successful parse)

Message construction

// Plain order
NewOrderSingle order = new NewOrderSingle(
        new ClOrdID("ORDER-001"), new Side(Side.BUY),
        new TransactTime(LocalDateTime.of(2006, 3, 24, 1, 5, 58)),
        new OrdType(OrdType.LIMIT));
order.set(new Symbol("AAPL"));
order.set(new OrderQty(100));
order.set(new Price(150.00));

// With NoAllocs repeating group (tag 78)
NewOrderSingle.NoAllocs alloc = new NewOrderSingle.NoAllocs();
alloc.set(new AllocAccount("ACC1"));
alloc.set(new AllocQty(50));
order.addGroup(alloc);

Inherits standard JMH settings from AbstractPerfTest: 3 warmup / 5 measurement iterations, 1 fork, Throughput + SampleTime output in nanoseconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants