use of com.navercorp.pinpoint.profiler.context.DefaultSpanChunk in project pinpoint by naver.
the class SpanThriftMessageConverterTest method newSpanChunk.
private SpanChunk newSpanChunk() {
final TraceId traceId = new DefaultTraceId(AGENT_ID, AGENT_START_TIME, 1L);
final TraceRoot traceRoot = new DefaultTraceRoot(traceId, AGENT_ID, AGENT_START_TIME, 100L);
return new DefaultSpanChunk(traceRoot, Arrays.asList(new SpanEvent()));
}
use of com.navercorp.pinpoint.profiler.context.DefaultSpanChunk in project pinpoint by naver.
the class SpanPostProcessorTest method postProcess1.
@Test
public void postProcess1() {
SpanProcessor<TSpan, TSpanChunk> spanChunkPostProcessor = new SpanProcessorV1();
TraceRoot internalTraceId = newInternalTraceId();
TSpanChunk tSpanChunk = new TSpanChunk();
try {
SpanChunk spanChunk = new DefaultSpanChunk(internalTraceId, new ArrayList<SpanEvent>());
spanChunkPostProcessor.postProcess(spanChunk, tSpanChunk);
Assert.fail();
} catch (Exception ignored) {
}
}
use of com.navercorp.pinpoint.profiler.context.DefaultSpanChunk in project pinpoint by naver.
the class SpanPostProcessorTest method postProcess2.
@Test
public void postProcess2() {
SpanProcessor<TSpan, TSpanChunk> spanChunkPostProcessor = new SpanProcessorV1();
TraceRoot internalTraceId = newInternalTraceId();
List<TSpanEvent> tSpanEvents = new ArrayList<TSpanEvent>();
TSpanChunk tSpanChunk = new TSpanChunk();
tSpanChunk.setSpanEventList(tSpanEvents);
List<SpanEvent> spanEvents = new ArrayList<SpanEvent>();
SpanChunk spanChunk = new DefaultSpanChunk(internalTraceId, spanEvents);
// one spanEvent
addSpanEvent(tSpanEvents, spanEvents);
spanChunkPostProcessor.postProcess(spanChunk, tSpanChunk);
// two spanEvent
addSpanEvent(tSpanEvents, spanEvents);
spanChunkPostProcessor.postProcess(spanChunk, tSpanChunk);
// three
addSpanEvent(tSpanEvents, spanEvents);
spanChunkPostProcessor.postProcess(spanChunk, tSpanChunk);
}
Aggregations