Search in sources :

Example 6 with ProcessorStatus

use of com.alibaba.cobar.manager.dataobject.cobarnode.ProcessorStatus in project cobar by alibaba.

the class TestProcessor method statistic.

public void statistic() {
    netInSum = 0;
    netOutSum = 0;
    requestSum = 0;
    psList = cobarAdapter.listProccessorStatus();
    for (ProcessorStatus ps : psList) {
        netInSum += ps.getNetIn();
        netOutSum += ps.getNetOut();
        requestSum += ps.getRequestCount();
    }
}
Also used : ProcessorStatus(com.alibaba.cobar.manager.dataobject.cobarnode.ProcessorStatus)

Aggregations

ProcessorStatus (com.alibaba.cobar.manager.dataobject.cobarnode.ProcessorStatus)6 CobarAdapterDAO (com.alibaba.cobar.manager.dao.CobarAdapterDAO)4 JSONObject (net.sf.json.JSONObject)4 CommandStatus (com.alibaba.cobar.manager.dataobject.cobarnode.CommandStatus)3 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 JSONArray (net.sf.json.JSONArray)3 CobarDO (com.alibaba.cobar.manager.dataobject.xml.CobarDO)2 Map (java.util.Map)2 ServerStatus (com.alibaba.cobar.manager.dataobject.cobarnode.ServerStatus)1 IOException (java.io.IOException)1 Connection (java.sql.Connection)1 ServletException (javax.servlet.ServletException)1 PropertyUtilsBean (org.apache.commons.beanutils.PropertyUtilsBean)1 Test (org.junit.Test)1