{
final Set<String> methods = stats.keySet();
for (final String method : methods)
{
// Get the underlying time stat for this method
final TimeStatistic stat = stats.get(method);
// Create a composite view of the stat's state
final MapCompositeValueSupport cvs = new MapCompositeValueSupport(METHOD_STATS_TYPE);
cvs.put(PROP_NAME_METHODSTATS_COUNT, SimpleValueSupport.wrap(stat.getCount()));
cvs.put(PROP_NAME_METHODSTATS_MAXTIME, SimpleValueSupport.wrap(stat.getMaxTime()));
cvs.put(PROP_NAME_METHODSTATS_MINTIME, SimpleValueSupport.wrap(stat.getMinTime()));
cvs.put(PROP_NAME_METHODSTATS_TOTALTIME, SimpleValueSupport.wrap(stat.getTotalTime()));
// Add the stat to the method map
methodMap.put(method, cvs);
}
}