@Override
    public void registerEventBufferHolder(EventBufferHolder eventBufferHolder, String name) {
        if (registeredObjects.get(eventBufferHolder) == null) {
            ObjectMetric objectMetric = new ObjectMetric(eventBufferHolder, name);
            metricRegistry.register(name, objectMetric.getGauge());
            registeredObjects.put(eventBufferHolder, new ObjectMetric(eventBufferHolder, name));
        }
    }
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