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);
}
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);
}
}
Aggregations