@Override
    public String toString() {
        return String.format("[BrokerMetrics,BrokerId=%d,Time=%d,Key:Value=%s]", brokerId(), time(), buildKVString());
    }
The buffer capacity is calculated as follows:
<ul>
  <li>(headerPos + {@link Byte#BYTES}) - version</li>
  <li>{@link Long#BYTES} - time</li>
  <li>{@link Integer#BYTES} - broker id</li>
  <li>{@link Integer#BYTES} - broker rack length</li>
  <li>brokerRack.length - broker rack</li>
  <li>body length - metric-value body</li>

</ul>

@param headerPos Header position
@return Byte buffer of the partition metric.
core/src/main/java/kafka/autobalancer/metricsreporter/metric/BrokerMetrics.java