You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "cpoerschke (via GitHub)" <gi...@apache.org> on 2023/05/12 08:32:20 UTC

[GitHub] [solr] cpoerschke commented on a diff in pull request #1627: SOLR-16273: Prometheus Metric Exporter is very slow when collecting large amounts of sample data

cpoerschke commented on code in PR #1627:
URL: https://github.com/apache/solr/pull/1627#discussion_r1192075956


##########
solr/prometheus-exporter/src/java/org/apache/solr/prometheus/collector/MetricSamples.java:
##########
@@ -19,24 +19,42 @@
 
 import io.prometheus.client.Collector;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 public class MetricSamples {
 
   private final Map<String, Collector.MetricFamilySamples> samplesByMetricName;
 
+  private Set<String> sampleMetricsCache;

Review Comment:
   minor: maybe could be final (from cursory code read only)
   ```suggestion
     private final Set<String> sampleMetricsCache;
   ```



-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org