Search in sources :

Example 1 with TThreadLightDump

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

the class ActiveThreadLightDumpService method createThreadDump.

private TThreadLightDump createThreadDump(Thread thread) {
    TThreadLightDump threadDump = new TThreadLightDump();
    threadDump.setThreadName(thread.getName());
    threadDump.setThreadId(thread.getId());
    threadDump.setThreadState(ThreadDumpUtils.toTThreadState(thread.getState()));
    return threadDump;
}
Also used : TThreadLightDump(com.navercorp.pinpoint.thrift.dto.command.TThreadLightDump)

Example 2 with TThreadLightDump

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

the class ActiveThreadLightDumpService method createActiveThreadDump.

private TActiveThreadLightDump createActiveThreadDump(ThreadDump threadDump) {
    final ActiveTraceSnapshot activeTraceInfo = threadDump.getActiveTraceSnapshot();
    final ThreadInfo threadInfo = threadDump.getThreadInfo();
    TThreadLightDump tThreadLightDump = createTThreadLightDump(threadInfo);
    TActiveThreadLightDump activeThreadDump = new TActiveThreadLightDump();
    activeThreadDump.setStartTime(activeTraceInfo.getStartTime());
    activeThreadDump.setLocalTraceId(activeTraceInfo.getLocalTransactionId());
    activeThreadDump.setThreadDump(tThreadLightDump);
    if (activeTraceInfo.isSampled()) {
        activeThreadDump.setSampled(true);
        activeThreadDump.setTransactionId(activeTraceInfo.getTransactionId());
        activeThreadDump.setEntryPoint(activeTraceInfo.getEntryPoint());
    }
    return activeThreadDump;
}
Also used : ThreadInfo(java.lang.management.ThreadInfo) ActiveTraceSnapshot(com.navercorp.pinpoint.profiler.context.active.ActiveTraceSnapshot) TThreadLightDump(com.navercorp.pinpoint.thrift.dto.command.TThreadLightDump) TActiveThreadLightDump(com.navercorp.pinpoint.thrift.dto.command.TActiveThreadLightDump)

Example 3 with TThreadLightDump

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

the class AgentActiveThreadDumpListTest method createTThreadLightDump.

private TThreadLightDump createTThreadLightDump(Thread thread) {
    TThreadLightDump threadDump = new TThreadLightDump();
    threadDump.setThreadName(thread.getName());
    threadDump.setThreadId(thread.getId());
    final TThreadState threadState = this.threadStateThriftMessageConverter.toMessage(thread.getState());
    threadDump.setThreadState(threadState);
    return threadDump;
}
Also used : TThreadState(com.navercorp.pinpoint.thrift.dto.command.TThreadState) TThreadLightDump(com.navercorp.pinpoint.thrift.dto.command.TThreadLightDump)

Example 4 with TThreadLightDump

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

the class ActiveThreadLightDumpService method createActiveLightThreadDump.

private TActiveThreadLightDump createActiveLightThreadDump(ActiveTraceInfo activeTraceInfo) {
    Thread thread = activeTraceInfo.getThread();
    if (thread == null) {
        return null;
    }
    TThreadLightDump threadDump = createThreadDump(thread);
    return createActiveThreadDump(activeTraceInfo, threadDump);
}
Also used : TThreadLightDump(com.navercorp.pinpoint.thrift.dto.command.TThreadLightDump)

Example 5 with TThreadLightDump

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

the class ActiveThreadLightDumpService method createTThreadLightDump.

private TThreadLightDump createTThreadLightDump(ThreadInfo threadInfo) {
    TThreadLightDump threadDump = new TThreadLightDump();
    threadDump.setThreadName(threadInfo.getThreadName());
    threadDump.setThreadId(threadInfo.getThreadId());
    final TThreadState threadState = this.threadStateThriftMessageConverter.toMessage(threadInfo.getThreadState());
    threadDump.setThreadState(threadState);
    return threadDump;
}
Also used : TThreadState(com.navercorp.pinpoint.thrift.dto.command.TThreadState) 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