use of com.insightfullogic.honest_profiler.core.profiles.ProfileNode in project honest-profiler by jvm-profiling-tools.
the class ProfileViewTest method rendersSingleMethod.
@Test
public void rendersSingleMethod() {
ProfileNode root = new ProfileNode(ProfileFixtures.printf, 1, 1);
Profile profile = new Profile(2, asList(new FlatProfileEntry(ProfileFixtures.printf, 1, 0, 1)), asList(new FlatProfileEntry(ProfileFixtures.printf, 1, 0, 1)), toTrees(root));
ui.accept(profile);
console.isShowingTraces(2);
console.displaysMethod(ProfileFixtures.printf);
console.outputContains("100.0");
}
use of com.insightfullogic.honest_profiler.core.profiles.ProfileNode in project honest-profiler by jvm-profiling-tools.
the class NodeCollector method normaliseBy.
private ProfileNode normaliseBy(int parentVisits, LongFunction<Method> nameRegistry) {
Method method = nameRegistry.apply(methodId);
List<ProfileNode> children = childrenByMethodId.values().stream().map(child -> child.normaliseBy(parentVisits, nameRegistry)).sorted(bySelfTimeShare).collect(toList());
return new ProfileNode(method, visits, parentVisits, children);
}
Aggregations