Search in sources :

Example 1 with DefaultAsyncTraceId

use of com.navercorp.pinpoint.profiler.context.id.DefaultAsyncTraceId in project pinpoint by naver.

the class DefaultAsyncTraceIdTest method nextAsyncSequence.

@Test
public void nextAsyncSequence() throws Exception {
    long agentStartTime = System.currentTimeMillis();
    TraceId traceId = new DefaultTraceId("testAgentId", agentStartTime, 0);
    AsyncTraceId asyncTraceId = new DefaultAsyncTraceId(traceId, 0, agentStartTime + 10);
    Assert.assertEquals(asyncTraceId.nextAsyncSequence(), 1);
    Assert.assertEquals(asyncTraceId.nextAsyncSequence(), 2);
    Assert.assertEquals(asyncTraceId.nextAsyncSequence(), 3);
}
Also used : DefaultTraceId(com.navercorp.pinpoint.profiler.context.id.DefaultTraceId) AsyncTraceId(com.navercorp.pinpoint.bootstrap.context.AsyncTraceId) DefaultAsyncTraceId(com.navercorp.pinpoint.profiler.context.id.DefaultAsyncTraceId) DefaultTraceId(com.navercorp.pinpoint.profiler.context.id.DefaultTraceId) TraceId(com.navercorp.pinpoint.bootstrap.context.TraceId) AsyncTraceId(com.navercorp.pinpoint.bootstrap.context.AsyncTraceId) DefaultAsyncTraceId(com.navercorp.pinpoint.profiler.context.id.DefaultAsyncTraceId) DefaultAsyncTraceId(com.navercorp.pinpoint.profiler.context.id.DefaultAsyncTraceId) Test(org.junit.Test)

Aggregations

AsyncTraceId (com.navercorp.pinpoint.bootstrap.context.AsyncTraceId)1 TraceId (com.navercorp.pinpoint.bootstrap.context.TraceId)1 DefaultAsyncTraceId (com.navercorp.pinpoint.profiler.context.id.DefaultAsyncTraceId)1 DefaultTraceId (com.navercorp.pinpoint.profiler.context.id.DefaultTraceId)1 Test (org.junit.Test)1