Search in sources :

Example 1 with ProfileTree

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());
}
Also used : ThreadMeta(com.insightfullogic.honest_profiler.core.parser.ThreadMeta) ProfileTree(com.insightfullogic.honest_profiler.core.profiles.ProfileTree)

Example 2 with ProfileTree

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();
}
Also used : ProfileTree(com.insightfullogic.honest_profiler.core.profiles.ProfileTree) Profile(com.insightfullogic.honest_profiler.core.profiles.Profile)

Aggregations

ProfileTree (com.insightfullogic.honest_profiler.core.profiles.ProfileTree)2 ThreadMeta (com.insightfullogic.honest_profiler.core.parser.ThreadMeta)1 Profile (com.insightfullogic.honest_profiler.core.profiles.Profile)1