Search in sources :

Example 1 with TmfStateStatistics

use of org.eclipse.tracecompass.tmf.core.statistics.TmfStateStatistics in project tracecompass by tracecompass.

the class CtfTmfLostEventStatisticsTest method setUp.

// ------------------------------------------------------------------------
// Maintenance
// ------------------------------------------------------------------------
/**
 * Test setup
 */
@BeforeClass
public static void setUp() {
    ITmfTrace trace = CtfTmfTestTraceUtils.getTrace(lostEventsTrace);
    fTrace = trace;
    /* Prepare the two analysis-backed state systems */
    fTotalsMod = new TmfStatisticsTotalsModule();
    fEventTypesMod = new TmfStatisticsEventTypesModule();
    try {
        fTotalsMod.setTrace(trace);
        fEventTypesMod.setTrace(trace);
    } catch (TmfAnalysisException e) {
        fail();
    }
    fTotalsMod.schedule();
    fEventTypesMod.schedule();
    assertTrue(fTotalsMod.waitForCompletion());
    assertTrue(fEventTypesMod.waitForCompletion());
    ITmfStateSystem totalsSS = fTotalsMod.getStateSystem();
    ITmfStateSystem eventTypesSS = fEventTypesMod.getStateSystem();
    assertNotNull(totalsSS);
    assertNotNull(eventTypesSS);
    fStats = new TmfStateStatistics(totalsSS, eventTypesSS);
}
Also used : ITmfTrace(org.eclipse.tracecompass.tmf.core.trace.ITmfTrace) TmfStatisticsTotalsModule(org.eclipse.tracecompass.tmf.core.statistics.TmfStatisticsTotalsModule) TmfAnalysisException(org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException) TmfStateStatistics(org.eclipse.tracecompass.tmf.core.statistics.TmfStateStatistics) TmfStatisticsEventTypesModule(org.eclipse.tracecompass.tmf.core.statistics.TmfStatisticsEventTypesModule) ITmfStateSystem(org.eclipse.tracecompass.statesystem.core.ITmfStateSystem) BeforeClass(org.junit.BeforeClass)

Example 2 with TmfStateStatistics

use of org.eclipse.tracecompass.tmf.core.statistics.TmfStateStatistics in project tracecompass by tracecompass.

the class TmfStateStatisticsTest method setUp.

/**
 * Test setup
 */
@BeforeClass
public static void setUp() {
    ITmfTrace trace = CtfTmfTestTraceUtils.getTrace(testTrace);
    fTrace = trace;
    /* Prepare the two analysis-backed state systems */
    fTotalsMod = new TmfStatisticsTotalsModule();
    fEventTypesMod = new TmfStatisticsEventTypesModule();
    try {
        fTotalsMod.setTrace(trace);
        fEventTypesMod.setTrace(trace);
    } catch (TmfAnalysisException e) {
        fail(e.getMessage());
    }
    fTotalsMod.schedule();
    fEventTypesMod.schedule();
    assertTrue(fTotalsMod.waitForCompletion());
    assertTrue(fEventTypesMod.waitForCompletion());
    ITmfStateSystem totalsSS = fTotalsMod.getStateSystem();
    ITmfStateSystem eventTypesSS = fEventTypesMod.getStateSystem();
    assertNotNull(totalsSS);
    assertNotNull(eventTypesSS);
    backend = new TmfStateStatistics(totalsSS, eventTypesSS);
}
Also used : ITmfTrace(org.eclipse.tracecompass.tmf.core.trace.ITmfTrace) TmfStatisticsTotalsModule(org.eclipse.tracecompass.tmf.core.statistics.TmfStatisticsTotalsModule) TmfAnalysisException(org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException) TmfStateStatistics(org.eclipse.tracecompass.tmf.core.statistics.TmfStateStatistics) TmfStatisticsEventTypesModule(org.eclipse.tracecompass.tmf.core.statistics.TmfStatisticsEventTypesModule) ITmfStateSystem(org.eclipse.tracecompass.statesystem.core.ITmfStateSystem) BeforeClass(org.junit.BeforeClass)

Aggregations

ITmfStateSystem (org.eclipse.tracecompass.statesystem.core.ITmfStateSystem)2 TmfAnalysisException (org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException)2 TmfStateStatistics (org.eclipse.tracecompass.tmf.core.statistics.TmfStateStatistics)2 TmfStatisticsEventTypesModule (org.eclipse.tracecompass.tmf.core.statistics.TmfStatisticsEventTypesModule)2 TmfStatisticsTotalsModule (org.eclipse.tracecompass.tmf.core.statistics.TmfStatisticsTotalsModule)2 ITmfTrace (org.eclipse.tracecompass.tmf.core.trace.ITmfTrace)2 BeforeClass (org.junit.BeforeClass)2