-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Without buffered reader, every single output character through given stack goes to "StreamEncoder public void write(int c)" and single element char array is created. It makes pressure to GC and CPU BufferedReader reduce the pressure write:130, StreamEncoder (sun.nio.cs) write:201, OutputStreamWriter (java.io) writeMetadata:338, PrometheusTextFormatWriter (io.prometheus.metrics.expositionformats) writeGauge:129, PrometheusTextFormatWriter (io.prometheus.metrics.expositionformats) write:68, PrometheusTextFormatWriter (io.prometheus.metrics.expositionformats) write:48, PrometheusOutputFormat$1 (org.springframework.boot.actuate.metrics.export.prometheus) scrape:87, PrometheusScrapeEndpoint (org.springframework.boot.actuate.metrics.export.prometheus) StreamEncoder public void write(int c) throws IOException { char[] cbuf = new char[1]; cbuf[0] = (char) c;
- Loading branch information
Showing
2 changed files
with
20 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters