@Override
    public void enableEventBufferHolderMetrics() {
        for (ConcurrentMap.Entry<Object, ObjectMetric> entry :
                registeredObjects.entrySet()) {
            if (!metricRegistry.getNames().contains(entry.getValue().getName())) {
                metricRegistry.register(entry.getValue().getName(), entry.getValue().getGauge());
            }
        }
    }
Register the EventBufferHolder that needs to be measured the used capacity usage

@param eventBufferHolder EventBufferHolder
@param name              An unique value to identify the object.
modules/siddhi-core/src/main/java/io/siddhi/core/util/statistics/metrics/SiddhiBufferedEventsMetric.java