LTTng: CPU usage analysis from the LTTng kernel trace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / request / TmfSchedulerBenchmark.java
index bbbb1f4506cd334f63de170e2aecf533a89027e8..952d1f1262c8d7d1c7dab8135dd78f7c29e11a58 100644 (file)
@@ -16,9 +16,9 @@ import java.io.PrintWriter;
 
 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;
 
 /**
@@ -38,13 +38,12 @@ public class TmfSchedulerBenchmark {
     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;
 
@@ -226,7 +225,6 @@ public class TmfSchedulerBenchmark {
     // ------------------------------------------------------------------------
 
     private static class BackgroundRequest extends TmfEventRequest {
-        private static final int CHUNK_SIZE = 0;
         private long startTime;
         private long endTimeLatency = -1;
         private long completedTime = 0;
@@ -237,9 +235,10 @@ public class TmfSchedulerBenchmark {
         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();
         }
@@ -291,7 +290,6 @@ public class TmfSchedulerBenchmark {
     }
 
     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;
@@ -302,9 +300,10 @@ public class TmfSchedulerBenchmark {
         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();
         }
This page took 0.025363 seconds and 5 git commands to generate.