Search in sources :

Example 21 with SpanChunkBo

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

the class SpanFactoryTest method testBuildSpanChunkBo.

@Test
public void testBuildSpanChunkBo() {
    TSpanChunk tSpanChunk = random.randomTSpanChunk();
    TSpanEvent tSpanEvent1 = random.randomTSpanEvent((short) 0);
    TSpanEvent tSpanEvent2 = random.randomTSpanEvent((short) 1);
    TSpanEvent tSpanEvent3 = random.randomTSpanEvent((short) 5);
    TSpanEvent tSpanEvent4 = random.randomTSpanEvent((short) 2);
    tSpanChunk.setSpanEventList(Arrays.asList(tSpanEvent1, tSpanEvent2, tSpanEvent3, tSpanEvent4));
    SpanChunkBo spanChunkBo = spanFactory.buildSpanChunkBo(tSpanChunk);
    spanFactoryAssert.assertSpanChunk(tSpanChunk, spanChunkBo);
}
Also used : TSpanChunk(com.navercorp.pinpoint.thrift.dto.TSpanChunk) SpanChunkBo(com.navercorp.pinpoint.common.server.bo.SpanChunkBo) TSpanEvent(com.navercorp.pinpoint.thrift.dto.TSpanEvent) Test(org.junit.Test)

Example 22 with SpanChunkBo

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

the class SpanFactoryTest method testNewSpanChunkBo.

@Test
public void testNewSpanChunkBo() {
    TSpanChunk tSpanChunk = random.randomTSpanChunk();
    SpanChunkBo spanChunkBo = spanFactory.newSpanChunkBo(tSpanChunk);
    spanFactoryAssert.assertSpanChunk(tSpanChunk, spanChunkBo);
}
Also used : TSpanChunk(com.navercorp.pinpoint.thrift.dto.TSpanChunk) SpanChunkBo(com.navercorp.pinpoint.common.server.bo.SpanChunkBo) Test(org.junit.Test)

Example 23 with SpanChunkBo

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

the class CollectorGrpcSpanFactoryTest method buildSpanChunkBo_sequence_overflow_NPE.

@Test
public void buildSpanChunkBo_sequence_overflow_NPE() {
    final PSpanChunk chunk = newSpanChunk_overflow();
    final Header header = newHeader();
    SpanChunkBo spanChunkBo = factory.buildSpanChunkBo(chunk, header);
    List<SpanEventBo> spanEventBoList = spanChunkBo.getSpanEventBoList();
    Assert.assertTrue(spanEventBoList.isEmpty());
}
Also used : Header(com.navercorp.pinpoint.grpc.Header) SpanChunkBo(com.navercorp.pinpoint.common.server.bo.SpanChunkBo) PSpanChunk(com.navercorp.pinpoint.grpc.trace.PSpanChunk) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) Test(org.junit.Test)

Example 24 with SpanChunkBo

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

the class CollectorGrpcSpanFactoryTest method buildSpanChunkBo_compact_depth.

@Test
public void buildSpanChunkBo_compact_depth() {
    final PSpanChunk chunk = newSpanChunk_compact_depth();
    final Header header = newHeader();
    SpanChunkBo spanChunkBo = factory.buildSpanChunkBo(chunk, header);
    List<SpanEventBo> spanEventBoList = spanChunkBo.getSpanEventBoList();
    SpanEventBo spanEventBo0 = spanEventBoList.get(0);
    SpanEventBo spanEventBo1 = spanEventBoList.get(1);
    Assert.assertEquals(1, spanEventBo0.getDepth());
    Assert.assertEquals(1, spanEventBo1.getDepth());
}
Also used : Header(com.navercorp.pinpoint.grpc.Header) SpanChunkBo(com.navercorp.pinpoint.common.server.bo.SpanChunkBo) PSpanChunk(com.navercorp.pinpoint.grpc.trace.PSpanChunk) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) Test(org.junit.Test)

Example 25 with SpanChunkBo

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

the class SpanEncoderTest method testEncodeSpanColumnValue_complexSpanChunk.

@Test
public void testEncodeSpanColumnValue_complexSpanChunk() throws Exception {
    SpanChunkBo spanChunkBo = randomComplexSpanChunk();
    assertSpanChunk(spanChunkBo);
}
Also used : SpanChunkBo(com.navercorp.pinpoint.common.server.bo.SpanChunkBo) Test(org.junit.Test)

Aggregations

SpanChunkBo (com.navercorp.pinpoint.common.server.bo.SpanChunkBo)27 SpanEventBo (com.navercorp.pinpoint.common.server.bo.SpanEventBo)13 Test (org.junit.Test)8 Header (com.navercorp.pinpoint.grpc.Header)5 TransactionId (com.navercorp.pinpoint.common.profiler.util.TransactionId)4 LocalAsyncIdBo (com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo)4 PSpanChunk (com.navercorp.pinpoint.grpc.trace.PSpanChunk)4 ByteBuffer (java.nio.ByteBuffer)4 Buffer (com.navercorp.pinpoint.common.buffer.Buffer)3 SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)3 ArrayList (java.util.ArrayList)3 FixedBuffer (com.navercorp.pinpoint.common.buffer.FixedBuffer)2 TSpanChunk (com.navercorp.pinpoint.thrift.dto.TSpanChunk)2 TSpanEvent (com.navercorp.pinpoint.thrift.dto.TSpanEvent)2 AutomaticBuffer (com.navercorp.pinpoint.common.buffer.AutomaticBuffer)1 StringCacheableBuffer (com.navercorp.pinpoint.common.buffer.StringCacheableBuffer)1 SpanDecoder (com.navercorp.pinpoint.common.server.bo.serializer.trace.v2.SpanDecoder)1 SpanDecodingContext (com.navercorp.pinpoint.common.server.bo.serializer.trace.v2.SpanDecodingContext)1 ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)1 PLocalAsyncId (com.navercorp.pinpoint.grpc.trace.PLocalAsyncId)1