Search in sources :

Example 21 with SpanEventBo

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

the class SpanEventBitFieldTest method testServiceType_raw_next.

@Test
public void testServiceType_raw_next() throws Exception {
    SpanEventBo prev = new SpanEventBo();
    SpanEventBo current = new SpanEventBo();
    prev.setServiceType((short) 2000);
    current.setServiceType((short) 2001);
    SpanEventBitField bitField = SpanEventBitField.build(current, prev);
    Assert.assertEquals(bitField.getServiceTypeEncodingStrategy(), ServiceTypeEncodingStrategy.RAW);
}
Also used : SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) Test(org.junit.Test)

Example 22 with SpanEventBo

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

the class SpanEventBitFieldTest method testSequence_delta_next.

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

Example 23 with SpanEventBo

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

the class SpanEventBitFieldTest method testDepth_raw_next.

@Test
public void testDepth_raw_next() throws Exception {
    SpanEventBo prev = new SpanEventBo();
    SpanEventBo current = new SpanEventBo();
    prev.setDepth(3);
    current.setDepth(4);
    SpanEventBitField bitField = SpanEventBitField.build(current, prev);
    Assert.assertEquals(bitField.getDepthEncodingStrategy(), DepthEncodingStrategy.RAW);
}
Also used : SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) Test(org.junit.Test)

Example 24 with SpanEventBo

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

the class SpanEventBitFieldTest method testNextAsyncId_first.

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

Example 25 with SpanEventBo

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

the class SpanEventBitFieldTest method testAsyncId_first.

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

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