/**
* Returns a copy of the controller statistics.
*
*/
public Map getStats() {
LongNumericStatistic statistic;
float totalIdleTime = 0;
long numberCASesProcessed = 0;
float totalDeserializeTime = 0;
float totalSerializeTime = 0;
HashMap map = new HashMap();
if ((statistic = getMonitor().getLongNumericStatistic("", Monitor.IdleTime)) != null) {
if (statistic.getValue() > 0) {
totalIdleTime = (float) statistic.getValue() / (float) 1000000; // get millis
}
}
map.put(Monitor.IdleTime, totalIdleTime);
if ((statistic = getMonitor().getLongNumericStatistic("", Monitor.ProcessCount)) != null) {
numberCASesProcessed = statistic.getValue();
}
map.put(Monitor.ProcessCount, numberCASesProcessed);
if ((statistic = getMonitor().getLongNumericStatistic("", Monitor.TotalDeserializeTime)) != null) {
if (statistic.getValue() > 0) {
totalDeserializeTime = (float) statistic.getValue() / (float) 1000000; // get millis
}
}
map.put(Monitor.TotalDeserializeTime, totalDeserializeTime);
if ((statistic = getMonitor().getLongNumericStatistic("", Monitor.TotalSerializeTime)) != null) {
if (statistic.getValue() > 0) {
totalSerializeTime = (float) statistic.getValue() / (float) 1000000; // get millis
}
}
map.put(Monitor.TotalSerializeTime, totalSerializeTime);
if (this instanceof PrimitiveAnalysisEngineController) {
float totalAEProcessTime = 0;
if ((statistic = getMonitor().getLongNumericStatistic("", Monitor.TotalAEProcessTime)) != null) {
if (statistic.getValue() > 0) {
totalAEProcessTime = (float) statistic.getValue() / (float) 1000000; // get millis
}
}
map.put(Monitor.TotalAEProcessTime, totalAEProcessTime);
}
return map;