use of com.navercorp.pinpoint.grpc.trace.PResult in project pinpoint by naver.
the class AgentClientMock method info.
public void info(final int count) {
for (int i = 0; i < count; i++) {
PAgentInfo request = PAgentInfo.newBuilder().build();
QueueingStreamObserver<PResult> responseObserver = getResponseObserver();
agentStub.requestAgentInfo(request, responseObserver);
PResult value = responseObserver.getValue();
logger.info("Result {}", value);
}
}
use of com.navercorp.pinpoint.grpc.trace.PResult in project pinpoint by naver.
the class AgentClientMock method sqlMetaData.
public void sqlMetaData(final int count) {
for (int i = 0; i < count; i++) {
PSqlMetaData request = PSqlMetaData.newBuilder().build();
PResult result = metadataStub.requestSqlMetaData(request);
}
}
use of com.navercorp.pinpoint.grpc.trace.PResult in project pinpoint by naver.
the class MetadataClientMock method request.
private void request(GeneratedMessageV3 message, int retryCount) {
if (retryCount <= 0) {
logger.warn("Drop message {}", debugLog(message));
return;
}
if (message instanceof PSqlMetaData) {
PSqlMetaData sqlMetaData = (PSqlMetaData) message;
StreamObserver<PResult> responseObserver = newResponseObserver(message, retryCount);
this.metadataStub.requestSqlMetaData(sqlMetaData, responseObserver);
} else if (message instanceof PApiMetaData) {
final PApiMetaData apiMetaData = (PApiMetaData) message;
StreamObserver<PResult> responseObserver = newResponseObserver(message, retryCount);
this.metadataStub.requestApiMetaData(apiMetaData, responseObserver);
} else if (message instanceof PStringMetaData) {
final PStringMetaData stringMetaData = (PStringMetaData) message;
StreamObserver<PResult> responseObserver = newResponseObserver(message, retryCount);
this.metadataStub.requestStringMetaData(stringMetaData, responseObserver);
} else {
logger.warn("Unsupported message {}", debugLog(message));
}
int requestCount = requestCounter.getAndIncrement();
logger.info("Request {} {}", requestCount, message);
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
}
use of com.navercorp.pinpoint.grpc.trace.PResult in project pinpoint by naver.
the class MetadataGrpcDataSender method request0.
// Request
private void request0(final GeneratedMessageV3 message, final int remainingRetryCount) {
if (message instanceof PSqlMetaData) {
final PSqlMetaData sqlMetaData = (PSqlMetaData) message;
final StreamObserver<PResult> responseObserver = newResponseStream(message, remainingRetryCount);
this.metadataStub.requestSqlMetaData(sqlMetaData, responseObserver);
} else if (message instanceof PApiMetaData) {
final PApiMetaData apiMetaData = (PApiMetaData) message;
final StreamObserver<PResult> responseObserver = newResponseStream(message, remainingRetryCount);
this.metadataStub.requestApiMetaData(apiMetaData, responseObserver);
} else if (message instanceof PStringMetaData) {
final PStringMetaData stringMetaData = (PStringMetaData) message;
final StreamObserver<PResult> responseObserver = newResponseStream(message, remainingRetryCount);
this.metadataStub.requestStringMetaData(stringMetaData, responseObserver);
} else {
logger.warn("Unsupported message {}", MessageFormatUtils.debugLog(message));
}
}
use of com.navercorp.pinpoint.grpc.trace.PResult in project pinpoint by naver.
the class AgentClientMock method apiMetaData.
public void apiMetaData(final int count) {
for (int i = 0; i < count; i++) {
PApiMetaData request = PApiMetaData.newBuilder().build();
PResult result = metadataStub.requestApiMetaData(request);
}
}
Aggregations