try {
String userId = duccWebSessionManager.getUserId(request);
WorkItemStateManager workItemStateManager = new WorkItemStateManager(job.getLogDirectory()+jobNo);
workItemStateManager.importData(userId);
PerformanceSummary performanceSummary = new PerformanceSummary(job.getLogDirectory()+jobNo);
PerformanceMetricsSummaryMap performanceMetricsSummaryMap = performanceSummary.readSummary(userId);
if( (performanceMetricsSummaryMap == null) || (performanceMetricsSummaryMap.size() == 0) ) {
sb.append("no data (map empty?)");
}
else {
int casCount = performanceMetricsSummaryMap.casCount();
/*
sb.append("<table>");
sb.append("<tr>");
sb.append("<th align=\"right\">");
sb.append("Job Id:");
sb.append("<th align=\"left\">");
sb.append(jobNo);
sb.append("<th>");
sb.append(" ");
sb.append("<th align=\"right\">");
sb.append("Workitems:");
sb.append("<th align=\"left\">");
sb.append(casCount);
sb.append("</table>");
sb.append("<br>");
*/
sb.append("<table>");
sb.append("<tr class=\"ducc-head\">");
sb.append("<th>");
sb.append("Name");
sb.append("</th>");
sb.append("<th>");
sb.append("Total<br><small>ddd:hh:mm:ss</small>");
sb.append("</th>");
sb.append("<th>");
sb.append("% of<br>Total");
sb.append("</th>");
sb.append("<th>");
sb.append("Avg<br><small>hh:mm:ss/workitem</small>");
sb.append("</th>");
sb.append("<th>");
sb.append("Min<br><small>hh:mm:ss/workitem</small>");
sb.append("</th>");
sb.append("<th>");
sb.append("Max<br><small>hh:mm:ss/workitem</small>");
sb.append("</th>");
sb.append("</tr>");
ArrayList <UimaStatistic> uimaStats = new ArrayList<UimaStatistic>();
uimaStats.clear();
//long analysisTime = 0;
for (Entry<String, PerformanceMetricsSummaryItem> entry : performanceMetricsSummaryMap.entrySet()) {
PerformanceMetricsSummaryItem item = entry.getValue();
String shortname = item.getDisplayName();
long anTime = item.getAnalysisTime();
long anMinTime = item.getAnalysisTimeMin();
long anMaxTime = item.getAnalysisTimeMax();