Search in sources :

Example 1 with ITmfTraceIndexer

use of org.eclipse.tracecompass.tmf.core.trace.indexer.ITmfTraceIndexer in project tracecompass by tracecompass.

the class CtfExperimentCheckpointIndexTest method setUpTraces.

private static void setUpTraces() {
    fTestTraces = new ITmfTrace[2];
    fTestTraces[0] = CtfTmfTestTraceUtils.getTrace(TEST_TRACE1);
    fTestTraces[1] = CtfTmfTestTraceUtils.getTrace(TEST_TRACE2);
    fExperiment = new TmfExperiment(ITmfEvent.class, EXPERIMENT, fTestTraces, BLOCK_SIZE, null) {

        @Override
        protected ITmfTraceIndexer createIndexer(int interval) {
            fIndexer = new TestIndexer(this, interval);
            return fIndexer;
        }
    };
    fExperiment.indexTrace(true);
}
Also used : ITmfTraceIndexer(org.eclipse.tracecompass.tmf.core.trace.indexer.ITmfTraceIndexer) TmfExperiment(org.eclipse.tracecompass.tmf.core.trace.experiment.TmfExperiment) ITmfEvent(org.eclipse.tracecompass.tmf.core.event.ITmfEvent) ITmfCheckpoint(org.eclipse.tracecompass.tmf.core.trace.indexer.checkpoint.ITmfCheckpoint)

Example 2 with ITmfTraceIndexer

use of org.eclipse.tracecompass.tmf.core.trace.indexer.ITmfTraceIndexer in project tracecompass by tracecompass.

the class Uml2SDTestFacility method selectExperiment.

/**
 * Selects the experiment.
 * @param wait true to wait for indexing to finish else false
 */
public void selectExperiment(final boolean wait) {
    TmfUml2SDTestTrace parser = new TmfUml2SDTestTrace();
    ITmfTrace trace = setupTrace(parser);
    parser.setTrace(trace);
    final ITmfTrace[] traces = new ITmfTrace[] { trace };
    fExperiment = new TmfExperiment(ITmfEvent.class, "TestExperiment", traces, TmfExperiment.DEFAULT_INDEX_PAGE_SIZE, null) {

        @Override
        protected ITmfTraceIndexer createIndexer(int interval) {
            return new TmfCheckpointIndexer(this, interval);
        }
    };
    trace.broadcast(new TmfTraceOpenedSignal(this, fExperiment, null));
    trace.broadcast(new TmfTraceSelectedSignal(this, fExperiment));
    if (wait) {
        while (fExperiment.getNbEvents() == 0) {
            delay(IUml2SDTestConstants.GUI_REFESH_DELAY);
        }
        waitForJobs();
        delay(IUml2SDTestConstants.GUI_REFESH_DELAY);
    }
}
Also used : ITmfTrace(org.eclipse.tracecompass.tmf.core.trace.ITmfTrace) ITmfTraceIndexer(org.eclipse.tracecompass.tmf.core.trace.indexer.ITmfTraceIndexer) TmfExperiment(org.eclipse.tracecompass.tmf.core.trace.experiment.TmfExperiment) ITmfEvent(org.eclipse.tracecompass.tmf.core.event.ITmfEvent) TmfTraceSelectedSignal(org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal) TmfTraceOpenedSignal(org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal) TmfUml2SDTestTrace(org.eclipse.tracecompass.tmf.ui.tests.uml2sd.trace.TmfUml2SDTestTrace) TmfCheckpointIndexer(org.eclipse.tracecompass.tmf.core.trace.indexer.checkpoint.TmfCheckpointIndexer)

Aggregations

ITmfEvent (org.eclipse.tracecompass.tmf.core.event.ITmfEvent)2 TmfExperiment (org.eclipse.tracecompass.tmf.core.trace.experiment.TmfExperiment)2 ITmfTraceIndexer (org.eclipse.tracecompass.tmf.core.trace.indexer.ITmfTraceIndexer)2 TmfTraceOpenedSignal (org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal)1 TmfTraceSelectedSignal (org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal)1 ITmfTrace (org.eclipse.tracecompass.tmf.core.trace.ITmfTrace)1 ITmfCheckpoint (org.eclipse.tracecompass.tmf.core.trace.indexer.checkpoint.ITmfCheckpoint)1 TmfCheckpointIndexer (org.eclipse.tracecompass.tmf.core.trace.indexer.checkpoint.TmfCheckpointIndexer)1 TmfUml2SDTestTrace (org.eclipse.tracecompass.tmf.ui.tests.uml2sd.trace.TmfUml2SDTestTrace)1