use of org.eclipse.tracecompass.analysis.os.linux.core.signals.TmfCpuSelectedSignal in project tracecompass by tracecompass.
the class UnfollowCpuAction method run.
@Override
public void run() {
fView.broadcast(new TmfCpuSelectedSignal(fView, -fCpu - 1, fTrace));
super.run();
}
use of org.eclipse.tracecompass.analysis.os.linux.core.signals.TmfCpuSelectedSignal in project tracecompass by tracecompass.
the class ResourcesAndCpuViewTest method testSignals.
/**
* Simple test to check the CPU Usage view after getting signals.
*/
@Test
public void testSignals() {
Widget widget = fResourcesViewBot.getWidget();
assertNotNull(widget);
ITmfTrace activeTrace = TmfTraceManager.getInstance().getActiveTrace();
assertNotNull(activeTrace);
// clear everything
TmfCpuSelectedSignal signal = new TmfCpuSelectedSignal(widget, -1, activeTrace);
broadcast(signal);
assertEquals("Before signal - CPU Usage Title", "CPU Usage", getChartTitle());
assertEquals("Before signal - Thread Table", 12, getTableCount());
fResourcesViewBot.setFocus();
// select cpu 1
signal = new TmfCpuSelectedSignal(widget, 1, activeTrace);
broadcast(signal);
assertEquals("After signal - CPU Usage Title", "CPU Usage 1", getChartTitle());
assertEquals("After signal - Thread Table", 4, getTableCount());
// select cpu 3 and 1
signal = new TmfCpuSelectedSignal(widget, 3, activeTrace);
broadcast(signal);
assertEquals("After signal 2 - CPU Usage Title", "CPU Usage 1, 3", getChartTitle());
assertEquals("After signal 2 - Thread Table", 8, getTableCount());
// reset
signal = new TmfCpuSelectedSignal(widget, -1, activeTrace);
broadcast(signal);
assertEquals("After signal clear - CPU Usage Title", "CPU Usage", getChartTitle());
assertEquals("After signal clear - Thread Table", 12, getTableCount());
}
use of org.eclipse.tracecompass.analysis.os.linux.core.signals.TmfCpuSelectedSignal in project tracecompass by tracecompass.
the class FollowCpuAction method run.
@Override
public void run() {
fView.broadcast(new TmfCpuSelectedSignal(fView, fCpu, fTrace));
super.run();
}
Aggregations