Search in sources :

Example 1 with TcpLttngEventMatching

use of org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching in project tracecompass by tracecompass.

the class EventMatchingBenchmark method setUp.

/**
 * Initialize some data
 */
@BeforeClass
public static void setUp() {
    TmfEventMatching.registerMatchObject(new TcpEventMatching());
    TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
}
Also used : TcpLttngEventMatching(org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching) TcpEventMatching(org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpEventMatching) BeforeClass(org.junit.BeforeClass)

Example 2 with TcpLttngEventMatching

use of org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching in project tracecompass by tracecompass.

the class TraceSynchronizationBenchmark method setUp.

/**
 * Initialize some data
 */
@BeforeClass
public static void setUp() {
    TmfEventMatching.registerMatchObject(new TcpEventMatching());
    TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
}
Also used : TcpLttngEventMatching(org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching) TcpEventMatching(org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpEventMatching) BeforeClass(org.junit.BeforeClass)

Example 3 with TcpLttngEventMatching

use of org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching in project tracecompass by tracecompass.

the class ExperimentSyncTest method setUp.

/**
 * Initialize some data
 */
@BeforeClass
public static void setUp() {
    TmfEventMatching.registerMatchObject(new TcpEventMatching());
    TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
}
Also used : TcpLttngEventMatching(org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching) TcpEventMatching(org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpEventMatching) BeforeClass(org.junit.BeforeClass)

Example 4 with TcpLttngEventMatching

use of org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching in project tracecompass by tracecompass.

the class MatchAndSyncTest method testMatching.

/**
 * Testing the packet matching
 */
@Test
public void testMatching() {
    CtfTmfTrace trace1 = CtfTmfTestTraceUtils.getTrace(CtfTestTrace.SYNC_SRC);
    CtfTmfTrace trace2 = CtfTmfTestTraceUtils.getTrace(CtfTestTrace.SYNC_DEST);
    List<@NonNull ITmfTrace> tracearr = new LinkedList<>();
    tracearr.add(trace1);
    tracearr.add(trace2);
    TmfEventMatching.registerMatchObject(new TcpEventMatching());
    TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
    TmfEventMatching twoTraceMatch = new TmfEventMatching(tracearr);
    assertTrue(twoTraceMatch.matchEvents());
    /* Set method and fields accessible to make sure the counts are ok */
    try {
        /* Verify number of matches */
        Method method = TmfEventMatching.class.getDeclaredMethod("getProcessingUnit");
        method.setAccessible(true);
        IMatchProcessingUnit procUnit = (IMatchProcessingUnit) method.invoke(twoTraceMatch);
        assertEquals(46, procUnit.countMatches());
    } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
        fail(e.getMessage());
    } finally {
        trace1.dispose();
        trace2.dispose();
    }
}
Also used : Method(java.lang.reflect.Method) LinkedList(java.util.LinkedList) InvocationTargetException(java.lang.reflect.InvocationTargetException) ITmfTrace(org.eclipse.tracecompass.tmf.core.trace.ITmfTrace) TcpLttngEventMatching(org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching) IMatchProcessingUnit(org.eclipse.tracecompass.tmf.core.event.matching.IMatchProcessingUnit) TmfEventMatching(org.eclipse.tracecompass.tmf.core.event.matching.TmfEventMatching) TcpEventMatching(org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpEventMatching) CtfTmfTrace(org.eclipse.tracecompass.tmf.ctf.core.trace.CtfTmfTrace) Test(org.junit.Test)

Example 5 with TcpLttngEventMatching

use of org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching in project tracecompass by tracecompass.

the class Activator method start.

// ------------------------------------------------------------------------
// Operators
// ------------------------------------------------------------------------
@Override
public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    TmfEventMatching.registerMatchObject(new TcpEventMatching());
    TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
    try {
        LttngAnalysesLoader.load();
    } catch (LamiAnalysisFactoryException | IOException e) {
        // Not the end of the world if the analyses are not available
        // $NON-NLS-1$
        logWarning("Cannot find LTTng analyses configuration files: " + e.getMessage());
    }
}
Also used : LamiAnalysisFactoryException(org.eclipse.tracecompass.internal.provisional.analysis.lami.core.module.LamiAnalysisFactoryException) TcpLttngEventMatching(org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching) IOException(java.io.IOException) TcpEventMatching(org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpEventMatching)

Aggregations

TcpEventMatching (org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpEventMatching)5 TcpLttngEventMatching (org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching)5 BeforeClass (org.junit.BeforeClass)3 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 Method (java.lang.reflect.Method)1 LinkedList (java.util.LinkedList)1 LamiAnalysisFactoryException (org.eclipse.tracecompass.internal.provisional.analysis.lami.core.module.LamiAnalysisFactoryException)1 IMatchProcessingUnit (org.eclipse.tracecompass.tmf.core.event.matching.IMatchProcessingUnit)1 TmfEventMatching (org.eclipse.tracecompass.tmf.core.event.matching.TmfEventMatching)1 ITmfTrace (org.eclipse.tracecompass.tmf.core.trace.ITmfTrace)1 CtfTmfTrace (org.eclipse.tracecompass.tmf.ctf.core.trace.CtfTmfTrace)1 Test (org.junit.Test)1