Search in sources :

Example 16 with SpanEventBo

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

the class SpanEventBitFieldTest method testEndPoint_first.

@Test
public void testEndPoint_first() throws Exception {
    SpanEventBo spanEventBo = new SpanEventBo();
    spanEventBo.setEndPoint("EndPoint");
    SpanEventBitField bitField = SpanEventBitField.buildFirst(spanEventBo);
    Assert.assertTrue(bitField.isSetEndPoint());
    bitField.setEndPoint(false);
    Assert.assertFalse(bitField.isSetEndPoint());
}
Also used : SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) Test(org.junit.Test)

Example 17 with SpanEventBo

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

the class SpanEventBitFieldTest method testServiceType_equals_next.

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

Example 18 with SpanEventBo

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

the class SpanEventBitFieldTest method testDestinationId_first.

@Test
public void testDestinationId_first() throws Exception {
    SpanEventBo spanEventBo = new SpanEventBo();
    spanEventBo.setDestinationId("DestinationId");
    SpanEventBitField bitField = SpanEventBitField.buildFirst(spanEventBo);
    Assert.assertTrue(bitField.isSetDestinationId());
    bitField.setDestinationId(false);
    Assert.assertFalse(bitField.isSetDestinationId());
}
Also used : SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo) Test(org.junit.Test)

Example 19 with SpanEventBo

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

the class SpanEventBitFieldTest method testDepth_equals_next.

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

Example 20 with SpanEventBo

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

the class SpanEventBitFieldTest method testHasException_first.

@Test
public void testHasException_first() throws Exception {
    SpanEventBo spanEventBo = new SpanEventBo();
    spanEventBo.setExceptionInfo(100, "excetpion");
    SpanEventBitField bitField = SpanEventBitField.buildFirst(spanEventBo);
    Assert.assertTrue(bitField.isSetHasException());
    bitField.setHasException(false);
    Assert.assertFalse(bitField.isSetHasException());
}
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