use of com.navercorp.pinpoint.grpc.trace.PMonitorInfo in project pinpoint by naver.
the class GrpcThreadDumpBoMapper method map.
public ThreadDumpBo map(final PThreadDump threadDump) {
final ThreadDumpBo threadDumpBo = new ThreadDumpBo();
threadDumpBo.setThreadName(threadDump.getThreadName());
threadDumpBo.setThreadId(threadDump.getThreadId());
threadDumpBo.setBlockedTime(threadDump.getBlockedTime());
threadDumpBo.setBlockedCount(threadDump.getBlockedCount());
threadDumpBo.setWaitedTime(threadDump.getWaitedTime());
threadDumpBo.setWaitedCount(threadDump.getWaitedCount());
threadDumpBo.setLockName(threadDump.getLockName());
threadDumpBo.setLockOwnerId(threadDump.getLockOwnerId());
threadDumpBo.setLockOwnerName(threadDump.getLockOwnerName());
threadDumpBo.setInNative(threadDump.getInNative());
threadDumpBo.setSuspended(threadDump.getSuspended());
final PThreadState threadState = threadDump.getThreadState();
threadDumpBo.setThreadState(this.threadStateMapper.map(threadState));
threadDumpBo.setStackTraceList(threadDump.getStackTraceList());
if (CollectionUtils.hasLength(threadDump.getLockedMonitorList())) {
final List<MonitorInfoBo> monitorInfoBoList = new ArrayList<>();
for (PMonitorInfo monitorInfo : threadDump.getLockedMonitorList()) {
final MonitorInfoBo monitorInfoBo = this.monitorInfoBoMapper.map(monitorInfo);
monitorInfoBoList.add(monitorInfoBo);
}
threadDumpBo.setLockedMonitorInfoList(monitorInfoBoList);
}
threadDumpBo.setLockedSynchronizerList(threadDump.getLockedSynchronizerList());
return threadDumpBo;
}
use of com.navercorp.pinpoint.grpc.trace.PMonitorInfo in project pinpoint by naver.
the class CommandGrpcToThriftMessageConverter method buildTThreadDump.
private TThreadDump buildTThreadDump(PThreadDump pThreadDump) {
TThreadDump tThreadDump = new TThreadDump();
tThreadDump.setThreadName(pThreadDump.getThreadName());
tThreadDump.setThreadId(pThreadDump.getThreadId());
tThreadDump.setBlockedTime(pThreadDump.getBlockedTime());
tThreadDump.setBlockedCount(pThreadDump.getBlockedCount());
tThreadDump.setWaitedTime(pThreadDump.getWaitedTime());
tThreadDump.setWaitedCount(pThreadDump.getWaitedCount());
tThreadDump.setInNative(pThreadDump.getInNative());
tThreadDump.setSuspended(pThreadDump.getSuspended());
tThreadDump.setThreadState(TThreadState.findByValue(pThreadDump.getThreadStateValue()));
for (String stackTrace : pThreadDump.getStackTraceList()) {
tThreadDump.addToStackTrace(stackTrace);
}
for (PMonitorInfo pMonitorInfo : pThreadDump.getLockedMonitorList()) {
final TMonitorInfo tMonitorInfo = new TMonitorInfo();
tMonitorInfo.setStackDepth(pMonitorInfo.getStackDepth());
tMonitorInfo.setStackFrame(pMonitorInfo.getStackFrame());
tThreadDump.addToLockedMonitors(tMonitorInfo);
}
tThreadDump.setLockName(pThreadDump.getLockName());
tThreadDump.setLockOwnerId(pThreadDump.getLockOwnerId());
tThreadDump.setLockOwnerName(pThreadDump.getLockOwnerName());
for (String lockedSynchronizer : pThreadDump.getLockedSynchronizerList()) {
tThreadDump.addToLockedSynchronizers(lockedSynchronizer);
}
return tThreadDump;
}
Aggregations