Search in sources :

Example 1 with LocalAsyncIdBo

use of com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo in project pinpoint by naver.

the class SpanFactoryTest method testFastLocalAsyncIdBo_empty.

@Test
public void testFastLocalAsyncIdBo_empty() {
    TSpanEvent tSpanEvent = new TSpanEvent();
    LocalAsyncIdBo localAsyncIdBo = spanFactory.fastLocalAsyncIdBo(Collections.singletonList(tSpanEvent));
    Assert.assertNull(localAsyncIdBo);
}
Also used : LocalAsyncIdBo(com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo) TSpanEvent(com.navercorp.pinpoint.thrift.dto.TSpanEvent) Test(org.junit.Test)

Example 2 with LocalAsyncIdBo

use of com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo in project pinpoint by naver.

the class SpanFactoryTest method testFullScanLocalAsyncIdBo_empty.

@Test
public void testFullScanLocalAsyncIdBo_empty() {
    TSpanEvent tSpanEvent = new TSpanEvent();
    TSpanChunk tSpanChunk = new TSpanChunk();
    tSpanChunk.setSpanEventList(Arrays.asList(tSpanEvent, tSpanEvent));
    LocalAsyncIdBo localAsyncIdBo = spanFactory.fullScanLocalAsyncIdBo(tSpanChunk);
    Assert.assertNull(localAsyncIdBo);
}
Also used : TSpanChunk(com.navercorp.pinpoint.thrift.dto.TSpanChunk) LocalAsyncIdBo(com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo) TSpanEvent(com.navercorp.pinpoint.thrift.dto.TSpanEvent) Test(org.junit.Test)

Example 3 with LocalAsyncIdBo

use of com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo in project pinpoint by naver.

the class SpanEncoderV0 method encodeSpanChunkQualifier.

@Override
public ByteBuffer encodeSpanChunkQualifier(SpanEncodingContext<SpanChunkBo> encodingContext) {
    final SpanChunkBo spanChunkBo = encodingContext.getValue();
    final List<SpanEventBo> spanEventBoList = spanChunkBo.getSpanEventBoList();
    final SpanEventBo firstEvent = getFirstSpanEvent(spanEventBoList);
    LocalAsyncIdBo localAsyncId = spanChunkBo.getLocalAsyncId();
    return encodeQualifier(TYPE_SPAN_CHUNK, spanChunkBo, firstEvent, localAsyncId);
}
Also used : SpanChunkBo(com.navercorp.pinpoint.common.server.bo.SpanChunkBo) LocalAsyncIdBo(com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo)

Example 4 with LocalAsyncIdBo

use of com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo in project pinpoint by naver.

the class SpanFactory method fastLocalAsyncIdBo.

@VisibleForTesting
LocalAsyncIdBo fastLocalAsyncIdBo(List<TSpanEvent> tSpanEventList) {
    final TSpanEvent first = tSpanEventList.get(0);
    if (isSetAsyncId(first)) {
        final int asyncId = first.getAsyncId();
        final short asyncSequence = first.getAsyncSequence();
        return new LocalAsyncIdBo(asyncId, asyncSequence);
    }
    return null;
}
Also used : LocalAsyncIdBo(com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo) TSpanEvent(com.navercorp.pinpoint.thrift.dto.TSpanEvent) VisibleForTesting(com.navercorp.pinpoint.common.annotations.VisibleForTesting)

Example 5 with LocalAsyncIdBo

use of com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo in project pinpoint by naver.

the class SpanFactory method buildSpanChunkBo.

public SpanChunkBo buildSpanChunkBo(TSpanChunk tSpanChunk) {
    final SpanChunkBo spanChunkBo = newSpanChunkBo(tSpanChunk);
    final LocalAsyncIdBo localAsyncIdBo = getLocalAsyncId(tSpanChunk);
    if (localAsyncIdBo != null) {
        spanChunkBo.setLocalAsyncId(localAsyncIdBo);
    }
    List<TSpanEvent> spanEventList = tSpanChunk.getSpanEventList();
    List<SpanEventBo> spanEventBoList = buildSpanEventBoList(spanEventList);
    spanChunkBo.addSpanEventBoList(spanEventBoList);
    long acceptedTime = acceptedTimeService.getAcceptedTime();
    spanChunkBo.setCollectorAcceptTime(acceptedTime);
    return spanChunkBo;
}
Also used : SpanChunkBo(com.navercorp.pinpoint.common.server.bo.SpanChunkBo) LocalAsyncIdBo(com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo) TSpanEvent(com.navercorp.pinpoint.thrift.dto.TSpanEvent) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo)

Aggregations

LocalAsyncIdBo (com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo)11 TSpanEvent (com.navercorp.pinpoint.thrift.dto.TSpanEvent)7 SpanChunkBo (com.navercorp.pinpoint.common.server.bo.SpanChunkBo)4 SpanEventBo (com.navercorp.pinpoint.common.server.bo.SpanEventBo)4 Test (org.junit.Test)4 VisibleForTesting (com.navercorp.pinpoint.common.annotations.VisibleForTesting)2 TSpanChunk (com.navercorp.pinpoint.thrift.dto.TSpanChunk)2 PLocalAsyncId (com.navercorp.pinpoint.grpc.trace.PLocalAsyncId)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1