@Override
    public String toString() {
        return String.format("[BrokerId=%d,Time=%d,Key:Value=%s]", brokerId, time, buildKVString());
    }
Serialize the metric to a byte buffer with the header size reserved.

@param headerSize the header size to reserve.
@return A ByteBuffer with header size reserved at the beginning.
core/src/main/java/kafka/autobalancer/metricsreporter/metric/AutoBalancerMetrics.java