@Setup
    public void setup(final Blackhole blackhole) {
        receiver = new ChannelReceiver<Ping>() {
            @Override
            public void accept(Ping element) {
                blackhole.consume(element.getValue());
            }
        };
        int requiredBufferSize = OffHeapFixedMessageSizeRingBuffer.getRequiredBufferSize(capacity, PortableJvmInfo.CACHE_LINE_SIZE);
        buffer = UnsafeDirectByteBuffer.allocateAlignedByteBuffer(requiredBufferSize, PortableJvmInfo.CACHE_LINE_SIZE);
        channel = new SpscChannel<Ping>(buffer, capacity, Ping.class);
        producer = channel.producer();
        consumer = channel.consumer(receiver);
    }
JMH Test to measure throughput for a tiny message with an SPSC Channel.

To run this benchmark:

java -jar target/microbenchmarks.jar ".*.SpscPingPongThroughputTest.*"
jctools-benchmarks/src/main/java/org/jctools/jmh/throughput/channels/SpscChannelThroughputTest.java