Search in sources :

Example 11 with LocalAsyncIdBo

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

the class CallStackMock method push.

public void push() {
    final SpanEventBo spanEvent = new SpanEventBo();
    final int startElapsed = (int) (currentTime - spanBo.getStartTime());
    currentTime++;
    spanEvent.setStartElapsed(startElapsed);
    spanEvent.setSequence(sequence++);
    checkExtend(index + 1);
    stack[index++] = spanEvent;
    if (this.latestStackIndex != this.index) {
        this.latestStackIndex = this.index;
        spanEvent.setDepth(this.latestStackIndex);
    }
    final SpanEventAlign spanEventAlign;
    if (this.async) {
        LocalAsyncIdBo localAsyncIdBo = new LocalAsyncIdBo(asyncId, 1);
        SpanChunkBo spanChunkBo = new SpanChunkBo();
        spanChunkBo.setLocalAsyncId(localAsyncIdBo);
        spanEventAlign = new SpanChunkEventAlign(spanBo, spanChunkBo, spanEvent);
    } else {
        spanEventAlign = new SpanEventAlign(spanBo, spanEvent);
    }
    callTree.add(spanEvent.getDepth(), spanEventAlign);
}
Also used : SpanChunkBo(com.navercorp.pinpoint.common.server.bo.SpanChunkBo) LocalAsyncIdBo(com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo) SpanEventBo(com.navercorp.pinpoint.common.server.bo.SpanEventBo)

Aggregations

LocalAsyncIdBo (com.navercorp.pinpoint.common.server.bo.LocalAsyncIdBo)11 TSpanEvent (com.navercorp.pinpoint.thrift.dto.TSpanEvent)7 SpanChunkBo (com.navercorp.pinpoint.common.server.bo.SpanChunkBo)4 SpanEventBo (com.navercorp.pinpoint.common.server.bo.SpanEventBo)4 Test (org.junit.Test)4 VisibleForTesting (com.navercorp.pinpoint.common.annotations.VisibleForTesting)2 TSpanChunk (com.navercorp.pinpoint.thrift.dto.TSpanChunk)2 PLocalAsyncId (com.navercorp.pinpoint.grpc.trace.PLocalAsyncId)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1