TimedStats[] entries = new TimedStats[avgDatabaseJobExecutionTimes.size()];
int i = 0;
synchronized(avgDatabaseJobExecutionTimes) {
for(Map.Entry<String, TrivialRunningAverage> entry : avgDatabaseJobExecutionTimes.entrySet()) {
TrivialRunningAverage avg = entry.getValue();
entries[i++] = new TimedStats(entry.getKey(), avg.countReports(), (long) avg.currentValue(), (long) avg.totalValue());
}
}
Arrays.sort(entries);
return entries;