@Override
      public Map<String, Metric> getMetrics() {
        final Map<String, Metric> gauges = new HashMap<>();
        gauges.put("logs-size", (Gauge<Integer>) this.logsInMemory::size);
        gauges.put("logs-memory-bytes", (Gauge<Long>) this.logsInMemory::estimatedBytes);
        return gauges;
      }
LogManager implementation.

@author boyan (boyan@alibaba-inc.com)

2018-Apr-04 4:42:20 PM
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/LogManagerImpl.java