{
if (stats == null)
{
return;
}
ServiceStatistics serviceStats = (stats instanceof ServiceStatistics) ? (ServiceStatistics) stats : null;
Arrays.fill(col, "-");
col[0] = stats.getName();
//TODO RM* Handling custom stats objects
if (stats instanceof SedaServiceStatistics)
{
col[1] = ((SedaServiceStatistics) stats).getComponentPoolMaxSize() + "/"
+ ((SedaServiceStatistics) stats).getComponentPoolAbsoluteMaxSize();
col[2] = String.valueOf(((SedaServiceStatistics) stats).getComponentPoolSize());
}
else
{
col[1] = "-";
col[2] = "-";
}
col[3] = String.valueOf(stats.getThreadPoolSize());
if (serviceStats != null)
{
col[4] = String.valueOf(serviceStats.getQueuedEvents());
col[5] = String.valueOf(serviceStats.getMaxQueueSize());
col[6] = String.valueOf(serviceStats.getAverageQueueSize());
}
col[7] = String.valueOf(stats.getSyncEventsReceived());
col[8] = String.valueOf(stats.getAsyncEventsReceived());
col[9] = String.valueOf(stats.getTotalEventsReceived());
if (serviceStats != null)
{
col[10] = String.valueOf(serviceStats.getSyncEventsSent());
col[11] = String.valueOf(serviceStats.getAsyncEventsSent());
col[12] = String.valueOf(serviceStats.getReplyToEventsSent());
col[13] = String.valueOf(serviceStats.getTotalEventsSent());
}
if (serviceStats != null)
{
col[14] = String.valueOf(serviceStats.getExecutedEvents());
}
col[15] = String.valueOf(stats.getExecutionErrors());
col[16] = String.valueOf(stats.getFatalErrors());
if (serviceStats != null)
{
col[17] = String.valueOf(serviceStats.getMinExecutionTime());
col[18] = String.valueOf(serviceStats.getMaxExecutionTime());
col[19] = String.valueOf(serviceStats.getAverageExecutionTime());
col[20] = String.valueOf(serviceStats.getTotalExecutionTime());
}
col[21] = String.valueOf(stats.getProcessedEvents());
col[22] = String.valueOf(stats.getMinProcessingTime());
col[23] = String.valueOf(stats.getMaxProcessingTime());
col[24] = String.valueOf(stats.getAverageProcessingTime());
col[25] = String.valueOf(stats.getTotalProcessingTime());
if (serviceStats != null)
{
int i = getRouterInfo(serviceStats.getInboundRouterStat(), col, 26);
i = getRouterInfo(serviceStats.getOutboundRouterStat(), col, i);
}
col[40] = String.valueOf(stats.getSamplePeriod());
}