private static ByteBufAllocatorMetric getMetricByAllocator(AbstractByteBufAllocator allocator) {
        if (allocator instanceof ByteBufAllocatorMetricProvider) {
            return ((ByteBufAllocatorMetricProvider) allocator).metric();
        }
        return null;
    }
Get the chunk size of the allocator.
It returns {@link Optional#empty} if the {@link #policy} is not {@link ByteBufAllocPolicy#isPooled}.
s3stream/src/main/java/com/automq/stream/s3/ByteBufAlloc.java