void writeAllValues(StreamMessage<Integer> stream) {
            if (stream instanceof StreamWriter) {
                @SuppressWarnings("unchecked")
                final StreamWriter<Integer> writer = (StreamWriter<Integer>) stream;
                for (Integer i : values) {
                    writer.write(i);
                }
                writer.close();
            }
            wroteLatch.countDown();
        }
Microbenchmarks of {@link StreamMessage Stream Messages}.
benchmarks/jmh/src/jmh/java/com/linecorp/armeria/common/stream/StreamMessageBenchmark.java