public Map<String, Metric> getMetrics() {
        if (this.metrics != null) {
            return this.metrics.getMetrics();
        }
        return Collections.emptyMap();
    }
Retrieve the metrics map, returns empty map if it is disabled.

@return metrics map
jraft-core/src/main/java/com/alipay/sofa/jraft/core/NodeMetrics.java