Rationalize ITmfTrace.initTrace()
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.kernel.core.tests / src / org / eclipse / linuxtools / lttng2 / kernel / core / tests / stateprovider / CTFTestFiles.java
CommitLineData
efc403bb
AM
1/*******************************************************************************
2 * Copyright (c) 2012 Ericsson
3 * Copyright (c) 2010, 2011 École Polytechnique de Montréal
4 * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
5 *
6 * All rights reserved. This program and the accompanying materials are
7 * made available under the terms of the Eclipse Public License v1.0 which
8 * accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 *
11 *******************************************************************************/
12
13package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
14
15import java.io.FileNotFoundException;
16
17import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
18import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
19
20/**
21 * Definitions used by all tests using CTF trace files
22 *
23 * @author alexmont
24 *
25 */
26public abstract class CTFTestFiles {
27
28 public final static long NANOSECS_PER_SEC = 1000000000L;
8636b448 29 private final static int PAGE_SIZE = 1000;
efc403bb
AM
30
31 /*
32 * To run these tests, you will need to download the following trace, at:
cab5dfad 33 * http://www.dorsal.polymtl.ca/~alexmont/data/trace2.tar.bz2
efc403bb 34 *
cab5dfad
AM
35 * and extract it in the
36 * .../org.eclipse.linuxtools.lttng2.kernel.core.tests/traces/ directory.
37 * You can also set up a custom path below.
efc403bb 38 */
8020be3c
AM
39 public final static String traceFile = "traces/trace2"; //$NON-NLS-1$
40 public final static long startTime = 18669367225825L;
41
42 public static CtfTmfTrace trace = null;
43
44 public static CtfTmfTrace getTestTrace() throws FileNotFoundException {
45 if (trace == null) {
46 trace = new CtfTmfTrace();
8636b448 47 trace.initTrace("test-trace2", traceFile, CtfTmfEvent.class, PAGE_SIZE); //$NON-NLS-1$
efc403bb 48 }
8020be3c 49 return trace;
efc403bb
AM
50 }
51
52}
This page took 0.025426 seconds and 5 git commands to generate.