ctf: bug 506892 Fix experiment size request benchmark
authorGeneviève Bastien <gbastien+lttng@versatic.net>
Wed, 2 Nov 2016 12:41:39 +0000 (08:41 -0400)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Thu, 3 Nov 2016 01:03:33 +0000 (21:03 -0400)
The experiment should be constructed only when all the traces are
initialized.

Change-Id: I1f5478013621ec3f135e409f4a0380688d7597f8
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/84341
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Hudson CI
ctf/org.eclipse.tracecompass.tmf.ctf.core.tests/perf/org/eclipse/tracecompass/tmf/ctf/core/tests/perf/experiment/ExperimentBenchmark.java

index e8ae3e65934303e6542b216253d56a6f14c6c2b0..000010210c9c5f0ec755afce66dbeb60f0e0eb1a 100644 (file)
@@ -120,7 +120,6 @@ public class ExperimentBenchmark {
             for (int i = 0; i < traces.length; i++) {
                 traces[i] = new CtfTmfTrace();
             }
-            fExperiment = new TmfExperimentStub("MegaExperiment", traces, BLOCK_SIZE);
             int j = 0;
             for (int i = 0; i < (traces.length) && (j < traces.length); i++) {
                 String absolutePath = traceFiles[j].getAbsolutePath();
@@ -131,6 +130,7 @@ public class ExperimentBenchmark {
                 }
                 j++;
             }
+            fExperiment = new TmfExperimentStub("MegaExperiment", traces, BLOCK_SIZE);
             if (traces[traces.length - 1].getPath() == null) {
                 throw new TmfTraceException("Insufficient valid traces in directory");
             }
This page took 0.025869 seconds and 5 git commands to generate.