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);
}
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);
}
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);
}
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());
}
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());
}
Aggregations