lttng: Move CTF dummy state provider to the test package
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Sat, 28 Apr 2012 06:15:29 +0000 (02:15 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Sat, 28 Apr 2012 07:23:58 +0000 (03:23 -0400)
It's still kept around, since it's very useful for benchmarks.

Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/CtfDummyInput.java [new file with mode: 0644]
org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/CtfDummyInputTest.java [deleted file]
org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/TestAll.java
org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/CtfDummyInput.java [deleted file]

diff --git a/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/CtfDummyInput.java b/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/CtfDummyInput.java
new file mode 100644 (file)
index 0000000..5cc2664
--- /dev/null
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2010, 2011 École Polytechnique de Montréal
+ * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
+ * 
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
+
+import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator;
+import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
+import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
+import org.eclipse.linuxtools.tmf.core.statesystem.StateSystem;
+import org.eclipse.linuxtools.tmf.core.statesystem.helpers.IStateChangeInput;
+
+/**
+ * "Dummy" version of the CTF event input plugin. This one only reads events
+ * (and creates the Event/EventWrapper objects) but discards them instead of
+ * inserting them in the Queue.
+ * 
+ * Only useful for benchmarking purposes.
+ * 
+ * @author alexmont
+ * 
+ */
+public class CtfDummyInput implements IStateChangeInput {
+
+    private final CtfIterator iterator;
+
+    /**
+     * Create a new dummy CTF state change input.
+     * 
+     * @param traceFile
+     *            The CTF trace to read from (can be any type of CTF trace)
+     */
+    public CtfDummyInput(CtfTmfTrace trace) {
+        this.iterator = new CtfIterator(trace);
+
+    }
+
+    @SuppressWarnings("unused")
+    @Override
+    public void run() {
+        /* We know currentEvent is unused here, it's by design! */
+        CtfTmfEvent currentEvent;
+        currentEvent = iterator.getCurrentEvent();
+        while (iterator.advance()) {
+            currentEvent = iterator.getCurrentEvent();
+        }
+    }
+
+    @Override
+    public long getStartTime() {
+        return iterator.getLocation().getLocation();
+    }
+
+    /**
+     * This dummy input does not insert any state changes anywhere, so this
+     * method does nothing.
+     */
+    @Override
+    public void assignTargetStateSystem(StateSystem ss) {
+        //
+    }
+
+    /**
+     * Since there is no target state system in the dummy input, this always
+     * returns null.
+     */
+    @Override
+    public StateSystem getStateSystem() {
+        return null;
+    }
+
+}
diff --git a/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/CtfDummyInputTest.java b/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/CtfDummyInputTest.java
deleted file mode 100644 (file)
index fe4f66a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Ericsson
- * Copyright (c) 2010, 2011 École Polytechnique de Montréal
- * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- * 
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.CtfDummyInput;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
-import org.junit.BeforeClass;
-
-/**
- * Test the dummy CTF input plugin
- * 
- * @author alexmont
- *
- */
-public class CtfDummyInputTest extends CtfKernelStateInputTest {
-
-    /* Hiding superclass method */
-    @BeforeClass
-    public static void initialize() throws TmfTraceException {
-        input = new CtfDummyInput(CtfTestFiles.getTestTrace());
-    }
-
-}
index 7522c7b2478df6756665daac84acd8bc7e320af5..15b53bbf3dc7bd8ad04d6fadcbc3783a6f09a0ca 100644 (file)
@@ -25,8 +25,9 @@ import org.junit.runners.Suite;
  * @version $Revision: 1.0 $
  */
 @RunWith(Suite.class)
-@Suite.SuiteClasses({ CtfDummyInputTest.class, CtfKernelStateInputTest.class,
-    StateSystemFullHistoryTest.class, StateSystemFullThreadedHistoryTest.class})
+@Suite.SuiteClasses({ CtfKernelStateInputTest.class,
+    StateSystemFullHistoryTest.class,
+    StateSystemFullThreadedHistoryTest.class})
 public class TestAll {
 
     /**
diff --git a/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/CtfDummyInput.java b/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/CtfDummyInput.java
deleted file mode 100644 (file)
index 997b67b..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Ericsson
- * Copyright (c) 2010, 2011 École Polytechnique de Montréal
- * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- * 
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider;
-
-import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator;
-import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
-import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
-import org.eclipse.linuxtools.tmf.core.statesystem.StateSystem;
-import org.eclipse.linuxtools.tmf.core.statesystem.helpers.IStateChangeInput;
-
-/**
- * "Dummy" version of the CTF event input plugin. This one only reads events
- * (and creates the Event/EventWrapper objects) but discards them instead of
- * inserting them in the Queue.
- * 
- * Only useful for benchmarking purposes.
- * 
- * @author alexmont
- * 
- */
-public class CtfDummyInput implements IStateChangeInput {
-
-    private final CtfIterator iterator;
-
-    /**
-     * Create a new dummy CTF state change input.
-     * 
-     * @param traceFile
-     *            The CTF trace to read from (can be any type of CTF trace)
-     */
-    public CtfDummyInput(CtfTmfTrace trace) {
-        this.iterator = new CtfIterator(trace);
-
-    }
-
-    @SuppressWarnings("unused")
-    @Override
-    public void run() {
-        /* We know currentEvent is unused here, it's by design! */
-        CtfTmfEvent currentEvent;
-        currentEvent = iterator.getCurrentEvent();
-        while (iterator.advance()) {
-            currentEvent = iterator.getCurrentEvent();
-        }
-    }
-
-    @Override
-    public long getStartTime() {
-        return iterator.getLocation().getLocation();
-    }
-
-    /**
-     * This dummy input does not insert any state changes anywhere, so this
-     * method does nothing.
-     */
-    @Override
-    public void assignTargetStateSystem(StateSystem ss) {
-        //
-    }
-
-    /**
-     * Since there is no target state system in the dummy input, this always
-     * returns null.
-     */
-    @Override
-    public StateSystem getStateSystem() {
-        return null;
-    }
-
-}
This page took 0.029807 seconds and 5 git commands to generate.