Currently, the memory usage calculation mechanism used on a Siddhi query
takes around 3 seconds. Therefore, when it comes to complex flow with
several of execution plans, it takes around (# of queries * 3) seconds.
Moreover, we have integrated carbon-metrics [1] (Gauges in this scenario)
with CEP for metrics calculation and reporting. Therefore, if we were to
use the same mechanism within the getValue() method of carbon-metrics
Gauges, it will increase the reporting time consumed by scheduled reporters
(per iteration) by ~(# of queries * 3) seconds. That might cause issues
such as reporters does not report according to the defined PollingPeriod,
takes a considerable amount of time to update and render Carbon Metrics UI,
etc. Therefore, is there a way to handle such time-consuming process within
Carbon Metrics Gauges?

Gauge.getValue() Implementation:

new Gauge<Long>() {
    @Override
    public Long getValue() {
    *// Below process takes ~3 seconds.*
        ObjectGraphMeasurer.Footprint footprint =
ObjectGraphMeasurer.measure(object);
        return MemoryMeasurerUtil.footprintSizeEstimate(footprint);
    }
});

[1] https://github.com/wso2/carbon-metrics

Thanks,
Grainier.
-- 
Grainier Perera
Software Engineer
Mobile : +94716122384
WSO2 Inc. | http://wso2.com
lean.enterprise.middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to