SaintBacchus commented on code in PR #16913:
URL: https://github.com/apache/doris/pull/16913#discussion_r1118242153
##########
fe/fe-core/src/main/java/org/apache/doris/metric/DorisMetricRegistry.java:
##########
@@ -52,11 +50,11 @@ public synchronized void addSystemMetrics(Metric sysMetric)
{
}
public synchronized List<Metric> getMetrics() {
- return Lists.newArrayList(metrics);
+ return
metrics.stream().sorted(Comparator.comparing(Metric::getName)).collect(Collectors.toList());
Review Comment:
why sort these metrics? because it order may be not rigiht as below:

--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]