Search in sources :

Example 6 with TThreadLightDump

use of com.navercorp.pinpoint.thrift.dto.command.TThreadLightDump in project pinpoint by naver.

the class CommandGrpcToThriftMessageConverter method buildTThreadLightDump.

private TThreadLightDump buildTThreadLightDump(PThreadLightDump pThreadDump) {
    TThreadLightDump tThreadLightDump = new TThreadLightDump();
    tThreadLightDump.setThreadId(pThreadDump.getThreadId());
    tThreadLightDump.setThreadName(pThreadDump.getThreadName());
    tThreadLightDump.setThreadState(TThreadState.findByValue(pThreadDump.getThreadStateValue()));
    return tThreadLightDump;
}
Also used : TThreadLightDump(com.navercorp.pinpoint.thrift.dto.command.TThreadLightDump)

Example 7 with TThreadLightDump

use of com.navercorp.pinpoint.thrift.dto.command.TThreadLightDump in project pinpoint by naver.

the class AgentActiveThreadDumpFactory method create2.

private AgentActiveThreadDump create2(TActiveThreadLightDump tActiveThreadLightDump) {
    Objects.requireNonNull(tActiveThreadLightDump, "tActiveThreadLightDump");
    TThreadLightDump activeThreadDump = tActiveThreadLightDump.getThreadDump();
    AgentActiveThreadDump.Builder builder = new AgentActiveThreadDump.Builder();
    builder.setThreadId(activeThreadDump.getThreadId());
    builder.setThreadName(activeThreadDump.getThreadName());
    builder.setThreadState(getThreadState(activeThreadDump.getThreadState()));
    builder.setStartTime(tActiveThreadLightDump.getStartTime());
    builder.setExecTime(System.currentTimeMillis() - tActiveThreadLightDump.getStartTime());
    builder.setLocalTraceId(tActiveThreadLightDump.getLocalTraceId());
    builder.setSampled(tActiveThreadLightDump.isSampled());
    builder.setTransactionId(tActiveThreadLightDump.getTransactionId());
    builder.setEntryPoint(tActiveThreadLightDump.getEntryPoint());
    builder.setDetailMessage(StringUtils.EMPTY);
    return builder.build();
}
Also used : TThreadLightDump(com.navercorp.pinpoint.thrift.dto.command.TThreadLightDump)

Aggregations

TThreadLightDump (com.navercorp.pinpoint.thrift.dto.command.TThreadLightDump)7 TThreadState (com.navercorp.pinpoint.thrift.dto.command.TThreadState)2 ActiveTraceSnapshot (com.navercorp.pinpoint.profiler.context.active.ActiveTraceSnapshot)1 TActiveThreadLightDump (com.navercorp.pinpoint.thrift.dto.command.TActiveThreadLightDump)1 ThreadInfo (java.lang.management.ThreadInfo)1