import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
+import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
-import org.eclipse.linuxtools.tmf.core.tests.shared.CtfTmfTestTraces;
+import org.eclipse.linuxtools.tmf.core.tests.shared.CtfTmfTestTrace;
import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
/**
private static final int NUM_LOOPS = 10;
private static final int NANOSECONDS_IN_MILLISECONDS = 1000000;
private static final int NANOSECONDS_IN_SECONDS = 1000000000;
- private static final int TRACE_INDEX = 0;
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
- private static CtfTmfTrace trace = CtfTmfTestTraces.getTestTrace(TRACE_INDEX);
+ private static CtfTmfTrace trace = CtfTmfTestTrace.KERNEL.getTrace();
private static ForegroundRequest lastForegroundRequest = null;
private static BackgroundRequest lastBackgroundRequest = null;
// ------------------------------------------------------------------------
private static class BackgroundRequest extends TmfEventRequest {
- private static final int CHUNK_SIZE = 0;
private long startTime;
private long endTimeLatency = -1;
private long completedTime = 0;
private boolean isWaiting = false;
BackgroundRequest(TmfTimeRange timeRange) {
- super(trace.getEventType(), timeRange,
- TmfDataRequest.ALL_DATA,
- CHUNK_SIZE,
+ super(trace.getEventType(),
+ timeRange,
+ 0,
+ ITmfEventRequest.ALL_DATA,
ExecutionType.BACKGROUND);
startTime = System.nanoTime();
}
}
private static class ForegroundRequest extends TmfEventRequest {
- private static final int CHUNK_SIZE = 0;
private long startTime = 0;
private long endTimeLatency = -1;
private long completedTime = 0;
private boolean isWaiting = false;
ForegroundRequest(TmfTimeRange timeRange) {
- super(trace.getEventType(), timeRange,
- TmfDataRequest.ALL_DATA,
- CHUNK_SIZE,
+ super(trace.getEventType(),
+ timeRange,
+ 0,
+ ITmfEventRequest.ALL_DATA,
ExecutionType.FOREGROUND);
startTime = System.nanoTime();
}