xinghuayu007 commented on a change in pull request #5733: URL: https://github.com/apache/incubator-doris/pull/5733#discussion_r623534358
########## File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Partition.java ########## @@ -500,4 +508,17 @@ public boolean convertRandomDistributionToHashDistribution(List<Column> baseSche } return hasChanged; } + + private static void registerMetric(Partition partition) { + GaugeMetric<Long> gauge = new GaugeMetric<Long>("partition_query_count", + Metric.MetricUnit.NOUNIT, "partition query count") { + @Override + public Long getValue() { + return partition.partition_query_count.longValue(); + } + }; + gauge.addLabel(new MetricLabel("partition_name", partition.getName())); + gauge.addLabel(new MetricLabel("partition_id", String.valueOf(partition.getId()))); + MetricRepo.addMetric(gauge); Review comment: Adding metrics for partition is to find zero-read partition for the consideration of cost. In a cluster of 30 DBS, every db has 30 tables, every table has 100 partitions. There will be 90000 partition metrics. That is acceptable. In BE, every tablet has 3 metrics. The number of tablet metric is much larger than partition metric. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org