Search in sources :

Example 76 with SpanEventBo

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

the class SpanEventBitFieldTest method testStartElapsed_delta_next.

@Test
public void testStartElapsed_delta_next() throws Exception {
    SpanEventBo prev = new SpanEventBo();
    SpanEventBo current = new SpanEventBo();
    prev.setStartElapsed(1234);
    current.setStartElapsed(1235);
    SpanEventBitField bitField = SpanEventBitField.build(current, prev);
    Assert.assertEquals(bitField.getStartElapsedEncodingStrategy(), StartElapsedTimeEncodingStrategy.PREV_DELTA);
}
Also used : SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) Test(org.junit.Test)

Example 77 with SpanEventBo

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

the class SpanEventBitFieldTest method testNextSpanId_first.

@Test
public void testNextSpanId_first() throws Exception {
    SpanEventBo spanEventBo = new SpanEventBo();
    spanEventBo.setNextSpanId(1234);
    SpanEventBitField bitField = SpanEventBitField.buildFirst(spanEventBo);
    Assert.assertTrue(bitField.isSetNextSpanId());
    bitField.setNextSpanId(false);
    Assert.assertFalse(bitField.isSetNextSpanId());
}
Also used : SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) Test(org.junit.Test)

Example 78 with SpanEventBo

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

the class SpanEventBitFieldTest method testSequence_add1_next.

@Test
public void testSequence_add1_next() throws Exception {
    SpanEventBo prev = new SpanEventBo();
    SpanEventBo current = new SpanEventBo();
    prev.setSequence((short) 10);
    current.setSequence((short) 11);
    SpanEventBitField bitField = SpanEventBitField.build(current, prev);
    Assert.assertEquals(bitField.getSequenceEncodingStrategy(), SequenceEncodingStrategy.PREV_ADD1);
}
Also used : SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) Test(org.junit.Test)

Example 79 with SpanEventBo

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

the class SpanEventBitFieldTest method testRpc_first.

@Test
public void testRpc_first() throws Exception {
    SpanEventBo spanEventBo = new SpanEventBo();
    spanEventBo.setRpc("Rpc");
    SpanEventBitField bitField = SpanEventBitField.buildFirst(spanEventBo);
    Assert.assertFalse(bitField.isSetRpc());
}
Also used : SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) Test(org.junit.Test)

Example 80 with SpanEventBo

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

the class SpanMapperV2 method sortSpanEvent.

private void sortSpanEvent(List<SpanBo> spanBoList) {
    for (SpanBo spanBo : spanBoList) {
        List<SpanEventBo> spanEventBoList = spanBo.getSpanEventBoList();
        spanEventBoList.sort(SpanEventComparator.INSTANCE);
    }
}
Also used : SpanBo(com.navercorp.pinpoint.common.server.bo.SpanBo) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo)

Aggregations

SpanEventBo (com.navercorp.pinpoint.common.server.bo.SpanEventBo)94 Test (org.junit.Test)39 SpanBo (com.navercorp.pinpoint.common.server.bo.SpanBo)26 AnnotationBo (com.navercorp.pinpoint.common.server.bo.AnnotationBo)14 SpanChunkBo (com.navercorp.pinpoint.common.server.bo.SpanChunkBo)13 ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)11 ArrayList (java.util.ArrayList)11 Buffer (com.navercorp.pinpoint.common.buffer.Buffer)9 ByteBuffer (java.nio.ByteBuffer)8 AutomaticBuffer (com.navercorp.pinpoint.common.buffer.AutomaticBuffer)4 LocalAsyncIdBo (com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo)4 Header (com.navercorp.pinpoint.grpc.Header)4 PSpanChunk (com.navercorp.pinpoint.grpc.trace.PSpanChunk)4 TSpanEvent (com.navercorp.pinpoint.thrift.dto.TSpanEvent)4 SpanAcceptor (com.navercorp.pinpoint.web.filter.visitor.SpanAcceptor)4 SpanEventVisitor (com.navercorp.pinpoint.web.filter.visitor.SpanEventVisitor)4 SpanReader (com.navercorp.pinpoint.web.filter.visitor.SpanReader)4 OffsetFixedBuffer (com.navercorp.pinpoint.common.buffer.OffsetFixedBuffer)3 SpanBitFiled (com.navercorp.pinpoint.common.server.bo.serializer.trace.v2.bitfield.SpanBitFiled)3 PSpanEvent (com.navercorp.pinpoint.grpc.trace.PSpanEvent)3