use of org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange in project tracecompass by tracecompass.
the class TmfTimeRangeTest method testConstructor.
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
@Test
public void testConstructor() {
final ITmfTimestamp ts1 = TmfTimestamp.fromSeconds(12345);
final ITmfTimestamp ts2 = TmfTimestamp.fromSeconds(12350);
final TmfTimeRange range = new TmfTimeRange(ts1, ts2);
assertEquals("startTime", ts1, range.getStartTime());
assertEquals("endTime", ts2, range.getEndTime());
}
use of org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange in project tracecompass by tracecompass.
the class TmfTimeRangeTest method testOpenRange3.
@Test
public void testOpenRange3() {
final TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH);
assertEquals("startTime", TmfTimestamp.BIG_BANG, range.getStartTime());
assertEquals("endTime", TmfTimestamp.BIG_CRUNCH, range.getEndTime());
}
use of org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange in project tracecompass by tracecompass.
the class TmfTimeRangeTest method testOpenRange1.
@Test
public void testOpenRange1() {
final ITmfTimestamp ts2 = TmfTimestamp.fromSeconds(12350);
final TmfTimeRange range = new TmfTimeRange(TmfTimestamp.BIG_BANG, ts2);
assertEquals("startTime", TmfTimestamp.BIG_BANG, range.getStartTime());
assertEquals("endTime", ts2, range.getEndTime());
}
use of org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange in project tracecompass by tracecompass.
the class TmfTimeRangeTest method testEqualStartTime.
@Test
public void testEqualStartTime() {
final ITmfTimestamp ts1 = TmfTimestamp.fromSeconds(12345);
final ITmfTimestamp ts2 = TmfTimestamp.fromSeconds(12350);
final ITmfTimestamp ts3 = TmfTimestamp.fromSeconds(12355);
final TmfTimeRange range1 = new TmfTimeRange(ts1, ts3);
final TmfTimeRange range2 = new TmfTimeRange(ts2, ts3);
final TmfTimeRange range3 = new TmfTimeRange(ts1, ts2);
assertTrue("equals", !range1.equals(range2));
assertTrue("equals", !range1.equals(range3));
}
use of org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange in project tracecompass by tracecompass.
the class TmfCoalescedEventRequestTest method trigger.
/**
* @param signal
* the trigger signal
*/
@TmfSignalHandler
public void trigger(final TmfTestTriggerSignal2 signal) {
TmfTimeRange range = new TmfTimeRange(TmfTimestamp.create(100, -3), TmfTimestamp.BIG_CRUNCH);
requestedEvents1 = new Vector<>();
request1 = new TmfEventRequest(ITmfEvent.class, range, 0, 1, ExecutionType.FOREGROUND) {
@Override
public void handleData(ITmfEvent event) {
super.handleData(event);
if (!isCompleted()) {
requestedEvents1.add(event);
}
}
};
providers = TmfProviderManager.getProviders(ITmfEvent.class, TmfTraceStub.class);
providers[0].sendRequest(request1);
}
Aggregations