yulei0824 commented on a change in pull request #16645:
URL: https://github.com/apache/flink/pull/16645#discussion_r681400856



##########
File path: 
flink-metrics/flink-metrics-influxdb/src/main/java/org/apache/flink/metrics/influxdb/MeasurementInfoProvider.java
##########
@@ -49,10 +50,13 @@ public MeasurementInfo getMetricInfo(String metricName, 
MetricGroup group) {
 
     private static Map<String, String> getTags(MetricGroup group) {
         // Keys are surrounded by brackets: remove them, transforming "<name>" 
to "name".
-        Map<String, String> tags = new HashMap<>();
-        for (Map.Entry<String, String> variable : 
group.getAllVariables().entrySet()) {
+        Map<String, String> variables = group.getAllVariables();
+        Map<String, String> tags = new HashMap<>(variables.size() * 4 / 3 + 1);
+        for (Map.Entry<String, String> variable : variables.entrySet()) {

Review comment:
       ok




-- 
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-unsubscr...@flink.apache.org

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


Reply via email to