use of com.insightfullogic.honest_profiler.core.profiles.ProfileTree in project honest-profiler by jvm-profiling-tools.
the class LogCollector method buildTreeProfile.
private List<ProfileTree> buildTreeProfile() {
return treesByThreadId.entrySet().stream().map(node -> {
final Long threadId = node.getKey();
final ThreadMeta meta = metaByThreadId.get(threadId);
final NodeCollector collector = node.getValue();
if (meta == null) {
return new ProfileTree(threadId, collector.normalise(methodByMethodId::get), collector.getNumberOfVisits());
}
return new ProfileTree(meta, collector.normalise(methodByMethodId::get), collector.getNumberOfVisits());
}).sorted(sortBySampleCount).collect(toList());
}
use of com.insightfullogic.honest_profiler.core.profiles.ProfileTree in project honest-profiler by jvm-profiling-tools.
the class ProfileTreeTest method assertProfileHasSingleTree.
private ProfileNode assertProfileHasSingleTree() {
Profile profile = listener.getProfile();
List<ProfileTree> trees = profile.getTrees();
assertEquals(1, trees.size());
return trees.get(0).getRootNode();
}
Aggregations