merlimat commented on code in PR #16197:
URL: https://github.com/apache/pulsar/pull/16197#discussion_r905256960
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java:
##########
@@ -318,4 +298,40 @@ private static void
generateManagedLedgerBookieClientMetrics(PulsarService pulsa
// nop
}
}
+
+
+ private static void writeOutMetricData(OutputStream out, ByteBuf buffer,
boolean exposeBufferMetrics,
+ boolean enableCompress) throws
IOException {
+ try {
+ if (enableCompress) {
+ out = new GZIPOutputStream(out);
Review Comment:
I think `GZIPOutputStream` will create a lot of garbage on the JVM heap :|
Could we just use
`org.apache.pulsar.common.compression.CompressionCodecZLib` on the buffer?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]