use of org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.SWTBotTimeGraph in project tracecompass by tracecompass.
the class FlameChartViewTest method getVisibleStackFrames.
private static List<String> getVisibleStackFrames(final SWTBotView viewBot) {
SWTBotTimeGraph timeGraph = new SWTBotTimeGraph(viewBot.bot());
List<String> stackFrames = new ArrayList<>();
for (SWTBotTimeGraphEntry entry : timeGraph.getEntry(TRACE, PROCESS, THREAD).getEntries()) {
String name = entry.getText();
if (!name.isEmpty()) {
stackFrames.add(name);
}
}
return stackFrames;
}
use of org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.SWTBotTimeGraph in project tracecompass by tracecompass.
the class FlameGraphTest method tryMouseDoubleclickZoom.
/**
* Try to zoom by doubleclicking an event
*
* @throws InterruptedException
* on interruption
*/
@Test
public void tryMouseDoubleclickZoom() throws InterruptedException {
super.treeTest();
loadFlameGraph();
SWTBotTimeGraph sbtg = new SWTBotTimeGraph(fView.bot());
// Test the number of timegraph entries in the graph
SWTBotTimeGraphEntry sbtge = sbtg.getEntry("");
assertEquals(3, sbtge.getEntries().length);
SWTBotTimeGraphEntry actualEntry = sbtge.getEntry("1");
actualEntry.doubleClick(40);
fFg.waitForUpdate();
assertEquals(new TmfTimeRange(TmfTimestamp.fromNanos(0), TmfTimestamp.fromNanos(80)), new TmfTimeRange(TmfTimestamp.fromNanos(fTimeGraphViewer.getTime0()), TmfTimestamp.fromNanos(fTimeGraphViewer.getTime1())));
}
use of org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.SWTBotTimeGraph in project tracecompass by tracecompass.
the class XmlTimegraphViewTest method testData.
/**
* Test that the timegraph view is open and is populated
*/
@Test
public void testData() {
SWTBotTimeGraph timegraph = getTimegraph();
// Test the window range
TimeGraphControl widget = timegraph.widget;
SWTBotUtils.waitUntil(control -> control.getTimeDataProvider().getTime0() == 1, widget, "window start time");
SWTBotUtils.waitUntil(control -> control.getTimeDataProvider().getTime1() == 7, widget, "window end time");
// test entries
SWTBotTimeGraphEntry traceEntry = timegraph.getEntry(TRACE_NAME);
SWTBotTimeGraphEntry entry = traceEntry.getEntry("checkpoint");
assertEquals("number of entries", 1, timegraph.getEntries().length);
assertEquals("number of entries", 1, traceEntry.getEntries().length);
assertEquals("name of entry", "checkpoint", entry.getText());
}
Aggregations