use of org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule in project tracecompass by tracecompass.
the class KernelContextSwitchAnalysis method getDependentAnalyses.
@Override
protected Iterable<IAnalysisModule> getDependentAnalyses() {
Set<IAnalysisModule> modules = new HashSet<>();
ITmfTrace trace = getTrace();
if (trace == null) {
// $NON-NLS-1$
throw new IllegalStateException("Analysis requires a trace");
}
/*
* This analysis depends on the LTTng kernel analysis, so it's added to
* dependent modules.
*/
Iterable<KernelAnalysisModule> kernelModules = TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class);
for (KernelAnalysisModule kernelModule : kernelModules) {
/* Only add the first one we find, if there is one */
modules.add(kernelModule);
break;
}
return modules;
}
use of org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule in project tracecompass by tracecompass.
the class KernelCpuUsageAnalysis method getDependentAnalyses.
@Override
protected Iterable<IAnalysisModule> getDependentAnalyses() {
Set<IAnalysisModule> modules = new HashSet<>();
ITmfTrace trace = getTrace();
if (trace == null) {
// $NON-NLS-1$
throw new IllegalStateException("Analysis requires a trace");
}
/*
* This analysis depends on the LTTng kernel analysis, so it's added to
* dependent modules.
*/
Iterable<TidAnalysisModule> kernelModules = TmfTraceUtils.getAnalysisModulesOfClass(trace, TidAnalysisModule.class);
for (TidAnalysisModule kernelModule : kernelModules) {
/* Only add the first one we find, if there is one */
modules.add(kernelModule);
break;
}
return modules;
}
use of org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule in project tracecompass by tracecompass.
the class InputOutputAnalysisModule method getDependentAnalyses.
@Override
protected Iterable<IAnalysisModule> getDependentAnalyses() {
Set<IAnalysisModule> modules = new HashSet<>();
ITmfTrace trace = getTrace();
if (trace == null) {
throw new IllegalStateException();
}
/*
* This analysis depends on the LTTng kernel analysis, so it's added to
* dependent modules.
*/
Iterable<TidAnalysisModule> tidModules = TmfTraceUtils.getAnalysisModulesOfClass(trace, TidAnalysisModule.class);
for (TidAnalysisModule tidModule : tidModules) {
/* Only add the first one we find, if there is one */
modules.add(tidModule);
break;
}
return modules;
}
use of org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule in project tracecompass by tracecompass.
the class UiResponseTest method beforeRunningTest.
@Override
protected void beforeRunningTest(ITmfTrace trace) {
List<IAnalysisModule> modules = new ArrayList<>(3);
modules.add(trace.getAnalysisModule(KernelCpuUsageAnalysis.ID));
modules.add(trace.getAnalysisModule(KernelAnalysisModule.ID));
modules.add(trace.getAnalysisModule(InputOutputAnalysisModule.ID));
for (IAnalysisModule module : modules) {
if (module != null) {
module.schedule();
}
}
for (IAnalysisModule module : modules) {
if (module != null) {
assertTrue(module.waitForCompletion());
}
}
}
use of org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule in project tracecompass by tracecompass.
the class AbstractSegmentStatisticsAnalysis method getDependentAnalyses.
@Override
protected Iterable<IAnalysisModule> getDependentAnalyses() {
ITmfTrace trace = getTrace();
if (trace != null) {
ISegmentStoreProvider provider = getSegmentProviderAnalysis(trace);
fSegmentStoreProviderModule = provider;
if (provider instanceof IAnalysisModule) {
return ImmutableList.of((IAnalysisModule) provider);
}
}
return super.getDependentAnalyses();
}
Aggregations