@Override
    public void registerObject(Object object, String name) {
        if (registeredObjects.get(object) == null) {
            ObjectMetric objectMetric = new ObjectMetric(object, name);
            metricRegistry.register(name, objectMetric.getGauge());
            registeredObjects.put(object, new ObjectMetric(object, name));
        }
    }
Register the object that needs to be measured the memory usage

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