use of com.navercorp.pinpoint.grpc.trace.PCmdActiveThreadDump in project pinpoint by naver.
the class GrpcActiveThreadDumpService method handle.
@Override
public void handle(PCmdRequest request, ProfilerCommandServiceGrpc.ProfilerCommandServiceStub profilerCommandServiceStub) {
logger.info("simpleCommandService:{}", request);
PCmdActiveThreadDump commandActiveThreadDump = request.getCommandActiveThreadDump();
PCmdActiveThreadDumpRes.Builder builder = PCmdActiveThreadDumpRes.newBuilder();
PCmdResponse commonResponse = PCmdResponse.newBuilder().setResponseId(request.getRequestId()).build();
builder.setCommonResponse(commonResponse);
builder.setType(JAVA);
builder.setSubType(JvmUtils.getType().name());
builder.setVersion(JvmUtils.getVersion().name());
List<PActiveThreadDump> activeThreadDumpList = getActiveThreadDumpList(commandActiveThreadDump);
builder.addAllThreadDump(activeThreadDumpList);
profilerCommandServiceStub.commandActiveThreadDump(builder.build(), EmptyStreamObserver.create());
}
use of com.navercorp.pinpoint.grpc.trace.PCmdActiveThreadDump in project pinpoint by naver.
the class GrpcActiveThreadDumpService method getActiveThreadDumpList.
private List<PActiveThreadDump> getActiveThreadDumpList(PCmdActiveThreadDump commandActiveThreadDump) {
ThreadDumpRequest request = ThreadDumpRequest.create(commandActiveThreadDump);
Collection<ThreadDump> activeTraceInfoList = activeThreadDump.getActiveThreadDumpList(request);
return toPActiveThreadDump(activeTraceInfoList);
}
Aggregations