import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentsStatisticsView;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.statistics.SystemCallLatencyStatisticsView;
+import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.SegmentStoreStatisticsView;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis;
import org.eclipse.tracecompass.testtraces.ctf.CtfTestTrace;
import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.SWTBotUtils;
import org.eclipse.tracecompass.tmf.ui.tests.shared.WaitUtils;
private static final int COUNT_COL = 5;
private static final String TRACE_TYPE = "org.eclipse.linuxtools.lttng2.kernel.tracetype";
private static final String PROJECT_NAME = "test";
- private static final String VIEW_ID = SystemCallLatencyStatisticsView.ID;
+ private static final String PRIMARY_VIEW_ID = SegmentStoreStatisticsView.ID;
+ private static final String SECONDARY_VIEW_ID = SystemCallLatencyAnalysis.ID;
/** The Log4j logger instance. */
private static final Logger fLogger = Logger.getRootLogger();
/*
* Open latency view
*/
- SWTBotUtils.openView(VIEW_ID);
+ SWTBotUtils.openView(PRIMARY_VIEW_ID, SECONDARY_VIEW_ID);
SWTWorkbenchBot bot = new SWTWorkbenchBot();
- SWTBotView viewBot = bot.viewById(VIEW_ID);
+ SWTBotView viewBot = bot.viewById(PRIMARY_VIEW_ID);
final IViewReference viewReference = viewBot.getViewReference();
IViewPart viewPart = UIThreadRunnable.syncExec(new Result<IViewPart>() {
@Override
}
});
assertNotNull(viewPart);
- if (!(viewPart instanceof SystemCallLatencyStatisticsView)) {
+ if (!(viewPart instanceof SegmentStoreStatisticsView)) {
fail("Could not instanciate view");
}
fTreeBot = viewBot.bot().tree();
*/
@After
public void closeTree() {
- SWTBotUtils.closeViewById(VIEW_ID, fBot);
+ SWTBotUtils.closeViewById(PRIMARY_VIEW_ID, fBot);
}
/**
public void testWithTrace() throws IOException, NoSuchMethodException, SecurityException, IllegalArgumentException {
String tracePath;
tracePath = FileLocator.toFileURL(CtfTestTrace.ARM_64_BIT_HEADER.getTraceURL()).getPath();
- SWTBotView view = fBot.viewById(VIEW_ID);
- SWTBotUtils.closeViewById(VIEW_ID, fBot);
+ SWTWorkbenchBot bot = new SWTWorkbenchBot();
+ SWTBotView view = bot.viewById(PRIMARY_VIEW_ID);
+ SWTBotUtils.closeViewById(PRIMARY_VIEW_ID, fBot);
+
SWTBotUtils.createProject(PROJECT_NAME);
SWTBotUtils.openTrace(PROJECT_NAME, tracePath, TRACE_TYPE);
WaitUtils.waitForJobs();
ByteArrayOutputStream os = new ByteArrayOutputStream();
assertNotNull(os);
IViewPart viewPart = view.getReference().getView(true);
- assertTrue(viewPart instanceof SystemCallLatencyStatisticsView);
+ assertTrue(viewPart instanceof AbstractSegmentsStatisticsView);
Class<@NonNull AbstractSegmentsStatisticsView> clazz = AbstractSegmentsStatisticsView.class;
Method method = clazz.getDeclaredMethod("exportToTsv", java.io.OutputStream.class);
method.setAccessible(true);
final Exception[] except = new Exception[1];
UIThreadRunnable.syncExec(() -> {
try {
- method.invoke((SystemCallLatencyStatisticsView) viewPart, os);
+ method.invoke((AbstractSegmentsStatisticsView) viewPart, os);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
except[0] = e;
}
org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.io.diskioactivity;x-friends:="org.eclipse.tracecompass.analysis.os.linux.ui.swtbot.tests",
org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.kernelmemoryusage;x-friends:="org.eclipse.tracecompass.analysis.os.linux.ui.swtbot.tests",
org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency;x-friends:="org.eclipse.tracecompass.analysis.os.linux.ui.swtbot.tests",
- org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.statistics;x-friends:="org.eclipse.tracecompass.analysis.os.linux.ui.swtbot.tests",
org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.resources;
x-friends:="org.eclipse.tracecompass.analysis.os.linux.ui.swtbot.tests,
org.eclipse.tracecompass.analysis.os.linux.ui.tests,
<view
allowMultiple="false"
category="org.eclipse.linuxtools.lttng2.ui.views.category"
- class="org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.statistics.SystemCallLatencyStatisticsView"
+ class="org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.SegmentStoreStatisticsView"
icon="icons/eview16/statistics_view.gif"
- id="org.eclipse.tracecompass.analysis.os.linux.ui.views.latency.statsview"
+ id="org.eclipse.tracecompass.analysis.timing.ui.segstore.statistics:org.eclipse.tracecompass.analysis.os.linux.latency.syscall"
name="%latency.stats.view.name"
restorable="true">
</view>
</output>
<output
class="org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
- id="org.eclipse.tracecompass.analysis.os.linux.ui.views.latency.statsview">
+ id="org.eclipse.tracecompass.analysis.timing.ui.segstore.statistics:org.eclipse.tracecompass.analysis.os.linux.latency.syscall">
<analysisModuleClass
class="org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis">
</analysisModuleClass>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015, 2016 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Bernd Hufmann - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.statistics;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Messages used in the LTTng kernel CPU usage view and viewers.
- *
- * @author Bernd Hufmann
- */
-@NonNullByDefault({})
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.statistics.messages"; //$NON-NLS-1$
- /** Name of the system call level in statistics tree */
- public static String LatencyStatistics_SyscallLevelName;
- /** Name of Total statistics */
- public static String LatencyStatistics_TotalLabel;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Bernd Hufmann - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.statistics;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentsStatisticsView;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.AbstractTmfTreeViewer;
-
-/**
- * View to display latency statistics.
- *
- * @author Bernd Hufmann
- *
- */
-public class SystemCallLatencyStatisticsView extends AbstractSegmentsStatisticsView {
-
- /** The view ID*/
- public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.ui.views.latency.statsview"; //$NON-NLS-1$
-
- @Override
- protected AbstractTmfTreeViewer createSegmentStoreStatisticsViewer(Composite parent) {
- return new SystemCallLatencyStatisticsViewer(parent);
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Bernd Hufmann - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.statistics;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentsStatisticsViewer;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.statistics.SystemCallLatencyStatisticsAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule;
-
-/**
- * A tree viewer implementation for displaying latency statistics
- *
- * @author Bernd Hufmann
- *
- */
-public class SystemCallLatencyStatisticsViewer extends AbstractSegmentsStatisticsViewer {
-
- private static final String SYSCALL_LEVEL = checkNotNull(Messages.LatencyStatistics_SyscallLevelName);
-
- /**
- * Constructor
- *
- * @param parent
- * the parent composite
- */
- public SystemCallLatencyStatisticsViewer(Composite parent) {
- super(parent);
- }
-
- /**
- * Gets the statistics analysis module
- *
- * @return the statistics analysis module
- */
- @Override
- protected @Nullable TmfAbstractAnalysisModule createStatisticsAnalysiModule() {
- SystemCallLatencyStatisticsAnalysisModule module = new SystemCallLatencyStatisticsAnalysisModule();
- return module;
- }
-
- @Override
- protected @NonNull final String getTotalLabel() {
- return checkNotNull(Messages.LatencyStatistics_TotalLabel);
- }
-
- @Override
- protected @NonNull final String getTypeLabel() {
- return SYSCALL_LEVEL;
- }
-
-
-
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2015, 2016 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Bernd Hufmann - Initial API and implementation
-###############################################################################
-LatencyStatistics_SyscallLevelName=System Calls
-LatencyStatistics_TotalLabel=Total
-
\ No newline at end of file
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.statistics;