private synchronized long sum() {
            if (!complete) {
                logger.warn("Stream not completed");
                return -1;
            }
            if (error != null) {
                logger.warn("Stream failed", error);
                return -2;
            }
            return sum;
        }
Microbenchmarks of {@link StreamMessage Stream Messages}.
benchmarks/jmh/src/jmh/java/com/linecorp/armeria/common/stream/StreamMessageBenchmark.java