public static void logStatisticsForOperation(Logger statsLog, String operation) {
if(statsLog.isDebugEnabled()) {
NSMutableDictionary statistics = ERXStats.statistics();
if (statistics != null) {
synchronized (statistics) {
NSArray values = ERXArrayUtilities.sortedArraySortedWithKey(statistics.allValues(), operation);
if (values.count() > 0) {
Long startTime = (Long) ERXThreadStorage.valueForKey(ERXStats.STATS_START_TIME_KEY);
Long lastTime = (Long) ERXThreadStorage.valueForKey(ERXStats.STATS_LAST_TIME_KEY);
long currentTime = System.currentTimeMillis();
String result = NSPropertyListSerialization.stringFromPropertyList(values);