use of org.eclipse.tracecompass.internal.lttng2.ust.ui.views.memusage.UstMemoryUsageView in project tracecompass by tracecompass.
the class MemoryUsageViewTest method testMemoryUsage.
/**
* Test Memory Usage data model
*/
@Test
public void testMemoryUsage() {
IViewPart viewPart = getSWTBotView().getViewReference().getView(true);
assertTrue(viewPart instanceof UstMemoryUsageView);
final TmfCommonXAxisChartViewer chartViewer = (TmfCommonXAxisChartViewer) getChartViewer(viewPart);
assertNotNull(chartViewer);
fBot.waitUntil(ConditionHelpers.xyViewerIsReadyCondition(chartViewer));
final Chart chart = getChart();
assertNotNull(chart);
checkAllEntries();
SWTBotUtils.waitUntil(c -> c.getSeriesSet().getSeries().length > 3, chart, "No data available");
chartViewer.setNbPoints(50);
/* Test data model*/
SWTBotUtils.waitUntil(json -> isChartDataValid(chart, json, FIRST_SERIES_NAME, SECOND_SERIES_NAME, THIRD_SERIES_NAME, FOURTH_SERIES_NAME), "resources/memory-res50.json", "Chart data is not valid");
/* Test type, style and color of series */
verifyChartStyle();
}
Aggregations