Hi all,

As Shankar suggested, I tested the code with a simple proxy service in
ESB and a sample process(BPEL) in BPS as well. They worked fine for
capturing CPU time per tenant as same as in Application Server. I
tried with a busy loop(inside a axis2 web service) changing parameters
to run more than 2000ms and worked fairly well.

Thread sleep time is not captured as CPU time in ThreadMXBean as expected.

In addition, I created two classes "CpuUsageStatisticsContainer" and
"CpuUsageStatisticsEntry" in
org.wso2.carbon.tomcat.ext/transport/statistics.
This adds the CPU time captured (only for service & webapp requests)
in org.wso2.carbon.tomcat.patch, valve to a ConcurrentLinkedQueue.

org.wso2.carbon.usage.agent/CpuUsageDataRetrievalTask in SLive
retrieves the CPU usage info and add them to the
PersistingControllerQueue as CpuUsage objects. publish() method in
PublisherUtils class publishes the data to BAM2. Since BAM2 is
undergoing several changes, I might have to wait a bit to accomplish
the publishing task.

Until then I'll be extensively testing this for other services and apps as well.

Thanks,
Lasindu



Lasindu Charith
Intern WSO2 Inc.
Mobile : 94714427192
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to