use of com.insightfullogic.honest_profiler.core.aggregation.result.straight.Node in project honest-profiler by jvm-profiling-tools.
the class HPFXUtil method newProfileTab.
// Profile Creation
public static final void newProfileTab(FxRobot robot, JavaFXApplication application, int expectedIndex, String name, LogScenario scenario, ProfileMode mode) {
TabPane tabPane = robot.lookup("#profileTabs").query();
waitUntil(() -> tabPane.isVisible());
assertEquals(expectedIndex, tabPane.getTabs().size());
ProfileContextGenerator gen = new ProfileContextGenerator(application, name, mode);
waitUntil(asyncFx(() -> gen.createNewProfile(scenario)));
waitUntil(() -> tabPane.getTabs().size() == expectedIndex + 1);
Tab tab = tabPane.getTabs().get(expectedIndex);
waitUntil(() -> ((Parent) tab.getGraphic()).getChildrenUnmodifiable().stream().filter(node -> node instanceof Label && name.equals(((Label) node).getText())).findFirst().isPresent());
}
use of com.insightfullogic.honest_profiler.core.aggregation.result.straight.Node in project honest-profiler by jvm-profiling-tools.
the class TreeViewQuickFilterTest method checkResult.
private void checkResult(FxRobot robot, ScenarioStraightFilter... filters) {
asList(ThreadGrouping.values()).forEach(tg -> {
asList(FrameGrouping.values()).forEach(fg -> {
selectThreadGrouping(robot, tg, "#tree");
selectFrameGrouping(robot, fg, "#tree");
clickExpandAll(robot, "#tree");
TreeTableView<Node> tableView = getTreeTableView(robot);
scenario.checkTreeAggregation(new TreeTableViewCheckAdapter(tg, fg, tableView), filters);
});
});
}
use of com.insightfullogic.honest_profiler.core.aggregation.result.straight.Node in project honest-profiler by jvm-profiling-tools.
the class TreeViewTest method testTreeViewScenario.
// Actual Test Method
@Test
public void testTreeViewScenario() {
FxRobot robot = new FxRobot();
newProfileTab(robot, app(), 0, scenario.getName(), scenario, LOG);
selectView(robot, TREE);
selectThreadGrouping(robot, threadGrouping, "#tree");
selectFrameGrouping(robot, frameGrouping, "#tree");
clickExpandAll(robot, "#tree");
TreeTableView<Node> tableView = getTreeTableView(robot);
runLater(() -> scenario.checkTreeAggregation(new TreeTableViewCheckAdapter(threadGrouping, frameGrouping, tableView)));
}
use of com.insightfullogic.honest_profiler.core.aggregation.result.straight.Node in project honest-profiler by jvm-profiling-tools.
the class TreeGenerator method assertContains.
public static final void assertContains(Tree tree, int selfCount, int totalCount, long selfTime, long totalTime, String... keys) {
Node node = getNode(tree, keys);
assertNotNull("No node found with keys " + Arrays.toString(keys) + " (" + tree.getGrouping() + ")", node);
assertEquals("Wrong self count for entry " + Arrays.toString(keys), selfCount, node.getSelfCnt());
assertEquals("Wrong total count for entry " + Arrays.toString(keys), totalCount, node.getTotalCnt());
assertEquals("Wrong self time for entry " + Arrays.toString(keys), selfTime, node.getSelfTime());
assertEquals("Wrong total time for entry " + Arrays.toString(keys), totalTime, node.getTotalTime());
}
use of com.insightfullogic.honest_profiler.core.aggregation.result.straight.Node in project honest-profiler by jvm-profiling-tools.
the class DescendantFlatAggregatorTest method get.
private Flat get(SimplifiedLogScenario scenario, ThreadGrouping tg, FrameGrouping fg, ThreadMeta thread, StackFrame... frames) {
DescendantFlatAggregator aggregator = new DescendantFlatAggregator();
TreeGenerator gen = new TreeGenerator(tg, fg);
scenario.executeAndEnd(gen);
Node node = gen.getNode(keysFor(tg, fg, thread, frames));
return aggregator.aggregate(node);
}
Aggregations