/** Run the benchmark with 2 small traces */
  @Test
  public void testSmallTraces() {
    assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
    assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());

    CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
    CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();

    Set<ITmfTrace> traces = ImmutableSet.of((ITmfTrace) trace1, trace2);
    runCpuTest(traces, "Match TCP events", 100);

    trace1.dispose();
    trace2.dispose();
  }
  /** Run the benchmark with 3 bigger traces */
  @Test
  public void testDjangoTraces() {
    assumeTrue(CtfTmfTestTrace.DJANGO_CLIENT.exists());
    assumeTrue(CtfTmfTestTrace.DJANGO_DB.exists());
    assumeTrue(CtfTmfTestTrace.DJANGO_HTTPD.exists());

    CtfTmfTrace trace1 = CtfTmfTestTrace.DJANGO_CLIENT.getTrace();
    CtfTmfTrace trace2 = CtfTmfTestTrace.DJANGO_DB.getTrace();
    CtfTmfTrace trace3 = CtfTmfTestTrace.DJANGO_HTTPD.getTrace();

    Set<ITmfTrace> traces = ImmutableSet.of((ITmfTrace) trace1, trace2, trace3);
    runCpuTest(traces, "Django traces", 10);
    runMemoryTest(traces, "Django traces", 10);

    trace1.dispose();
    trace2.dispose();
    trace3.dispose();
  }
Esempio n. 3
0
 /** Perform post-test clean-up. */
 @After
 public void tearDown() {
   if (trace != null) {
     trace.dispose();
   }
   if (iterator != null) {
     iterator.dispose();
   }
 }