.map(this::toFlatProfileEntry)
.collect(toList());
}
private FlatProfileEntry toFlatProfileEntry(Entry<Long, CallCounts> entry) {
Method method = methodNames.get(entry.getKey());
final CallCounts callCounts = entry.getValue();
double totalTimeShare = (double) callCounts.timeAppeared / traceCount;
double selfTimeShare = (double) callCounts.timeInvokingThis / traceCount;
return new FlatProfileEntry(method, totalTimeShare, selfTimeShare);
}