@Benchmark
    public List<Integer> collectWithSubscriberDirect(StreamObjects streamObjects) {
        final StreamMessage<Integer> stream = newStream(streamObjects);
        streamObjects.writeAllValues(stream);
        final StreamMessageCollector<Integer> collector = new StreamMessageCollector<>();
        stream.subscribe(collector, ImmediateEventExecutor.INSTANCE);
        return collector.collect().join();
    }
Micro benchmarks of {@link StreamMessage#collect()}.
benchmarks/jmh/src/jmh/java/com/linecorp/armeria/common/stream/StreamMessageCollectorBenchmark.java