Search in sources :

Example 1 with PCmdActiveThreadDump

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());
}
Also used : PCmdActiveThreadDumpRes(com.navercorp.pinpoint.grpc.trace.PCmdActiveThreadDumpRes) PCmdActiveThreadDump(com.navercorp.pinpoint.grpc.trace.PCmdActiveThreadDump) PActiveThreadDump(com.navercorp.pinpoint.grpc.trace.PActiveThreadDump) PCmdResponse(com.navercorp.pinpoint.grpc.trace.PCmdResponse)

Example 2 with PCmdActiveThreadDump

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);
}
Also used : PActiveThreadDump(com.navercorp.pinpoint.grpc.trace.PActiveThreadDump) PThreadDump(com.navercorp.pinpoint.grpc.trace.PThreadDump) ThreadDump(com.navercorp.pinpoint.profiler.receiver.service.ThreadDump) PCmdActiveThreadDump(com.navercorp.pinpoint.grpc.trace.PCmdActiveThreadDump) ThreadDumpRequest(com.navercorp.pinpoint.profiler.receiver.service.ThreadDumpRequest)

Aggregations

PActiveThreadDump (com.navercorp.pinpoint.grpc.trace.PActiveThreadDump)2 PCmdActiveThreadDump (com.navercorp.pinpoint.grpc.trace.PCmdActiveThreadDump)2 PCmdActiveThreadDumpRes (com.navercorp.pinpoint.grpc.trace.PCmdActiveThreadDumpRes)1 PCmdResponse (com.navercorp.pinpoint.grpc.trace.PCmdResponse)1 PThreadDump (com.navercorp.pinpoint.grpc.trace.PThreadDump)1 ThreadDump (com.navercorp.pinpoint.profiler.receiver.service.ThreadDump)1 ThreadDumpRequest (com.navercorp.pinpoint.profiler.receiver.service.ThreadDumpRequest)1