use of org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis in project tracecompass by tracecompass.
the class SystemCallAnalysisUsageBenchmark method runTest.
private static void runTest(@NonNull CtfTestTrace testTrace, String traceName) {
/* First, complete the analysis */
LttngKernelTrace trace = new LttngKernelTrace();
SystemCallLatencyAnalysis module = getModule(testTrace, trace);
long segmentEnd = benchmarkIteration(traceName, module);
benchmarkIntersection(traceName, module, trace.getStartTime().getValue(), segmentEnd);
/*
* Delete the supplementary files at the end of the benchmarks
*/
deleteSupplementaryFiles(trace);
module.dispose();
trace.dispose();
CtfTmfTestTraceUtils.dispose(testTrace);
}
use of org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis in project tracecompass by tracecompass.
the class SyscallAnalysisTest method testSmallTraceSequential.
/**
* This will load the analysis and test it. as it depends on Kernel, this
* test runs the kernel trace first then the analysis
*/
@Test
public void testSmallTraceSequential() {
final SystemCallLatencyAnalysis syscallModule = fSyscallModule;
assertNotNull(syscallModule);
ISegmentStore<@NonNull ISegment> segmentStore = syscallModule.getSegmentStore();
assertNotNull(segmentStore);
assertEquals(1801, segmentStore.size());
}
use of org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis in project tracecompass by tracecompass.
the class SystemCallAnalysisBenchmark method runTest.
private static void runTest(@NonNull CtfTestTrace testTrace, String testName, RunMethod method, Dimension dimension) {
Performance perf = Performance.getDefault();
PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + testName);
perf.tagAsSummary(pm, "Syscall " + testName, dimension);
for (int i = 0; i < LOOP_COUNT; i++) {
LttngKernelTrace trace = null;
IAnalysisModule module = null;
String path = CtfTmfTestTraceUtils.getTrace(testTrace).getPath();
try {
// Make sure the TID analysis has run on this trace
trace = new LttngKernelTrace();
trace.initTrace(null, path, CtfTmfEvent.class);
trace.traceOpened(new TmfTraceOpenedSignal(trace, trace, null));
module = trace.getAnalysisModule(TidAnalysisModule.ID);
assertNotNull(module);
module.schedule();
module.waitForCompletion();
module = new SystemCallLatencyAnalysis();
module.setId("test");
module.setTrace(trace);
method.execute(pm, module);
/*
* Delete the supplementary files, so that the next iteration
* rebuilds the state system.
*/
File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
for (File file : suppDir.listFiles()) {
file.delete();
}
} catch (TmfAnalysisException | TmfTraceException e) {
fail(e.getMessage());
} finally {
if (module != null) {
module.dispose();
}
if (trace != null) {
trace.dispose();
}
}
}
pm.commit();
CtfTmfTestTraceUtils.dispose(testTrace);
}
use of org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis in project tracecompass by tracecompass.
the class SystemCallAnalysisUsageBenchmark method getModule.
private static SystemCallLatencyAnalysis getModule(@NonNull CtfTestTrace testTrace, @NonNull LttngKernelTrace trace) {
SystemCallLatencyAnalysis module = null;
String path = CtfTmfTestTraceUtils.getTrace(testTrace).getPath();
try {
// Make sure the TID analysis has run on this trace
trace.initTrace(null, path, CtfTmfEvent.class);
deleteSupplementaryFiles(trace);
trace.traceOpened(new TmfTraceOpenedSignal(trace, trace, null));
IAnalysisModule tidModule = trace.getAnalysisModule(TidAnalysisModule.ID);
assertNotNull(tidModule);
tidModule.schedule();
tidModule.waitForCompletion();
/* Initialize the analysis module */
module = new SystemCallLatencyAnalysis();
module.setId("test");
module.setTrace(trace);
TmfTestHelper.executeAnalysis(module);
} catch (TmfAnalysisException | TmfTraceException e) {
fail(e.getMessage());
}
return module;
}
Aggregations