use of com.insightfullogic.honest_profiler.core.collector.FlatProfileEntry in project honest-profiler by jvm-profiling-tools.
the class ProfileViewTest method rendersMultiBranchProfile.
@Test
public void rendersMultiBranchProfile() {
ProfileNode left = new ProfileNode(ProfileFixtures.println, 1, 2);
ProfileNode right = new ProfileNode(ProfileFixtures.append, 1, 2);
ProfileNode root = new ProfileNode(ProfileFixtures.printf, 1, 1, asList(left, right));
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.displaysMethod(ProfileFixtures.append);
console.displaysMethod(ProfileFixtures.println);
console.outputContains("50.0");
console.outputContains("100.0");
}
use of com.insightfullogic.honest_profiler.core.collector.FlatProfileEntry 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");
}
Aggregations