use of com.navercorp.pinpoint.profiler.context.active.ActiveTraceInfo in project pinpoint by naver.
the class ActiveThreadDumpService method getActiveThreadDumpList.
private List<TActiveThreadDump> getActiveThreadDumpList(TCmdActiveThreadDump request, int limit, List<ActiveTraceInfo> activeTraceInfoList) {
int targetThreadNameListSize = request.getThreadNameListSize();
int localTraceIdListSize = request.getLocalTraceIdListSize();
boolean filterEnable = (targetThreadNameListSize + localTraceIdListSize) > 0;
List<TActiveThreadDump> activeThreadDumpList = new ArrayList<TActiveThreadDump>(Math.min(limit, activeTraceInfoList.size()));
if (filterEnable) {
for (ActiveTraceInfo activeTraceInfo : activeTraceInfoList) {
if (!ActiveThreadDumpUtils.isTraceThread(activeTraceInfo, request.getThreadNameList(), request.getLocalTraceIdList())) {
continue;
}
TActiveThreadDump activeThreadDump = createActiveThreadDump(activeTraceInfo);
if (activeThreadDump != null) {
if (limit > activeThreadDumpList.size()) {
activeThreadDumpList.add(activeThreadDump);
}
}
}
} else {
for (ActiveTraceInfo activeTraceInfo : activeTraceInfoList) {
TActiveThreadDump activeThreadDump = createActiveThreadDump(activeTraceInfo);
if (activeThreadDump != null) {
if (limit > activeThreadDumpList.size()) {
activeThreadDumpList.add(activeThreadDump);
}
}
}
}
return activeThreadDumpList;
}
use of com.navercorp.pinpoint.profiler.context.active.ActiveTraceInfo in project pinpoint by naver.
the class ActiveThreadLightDumpService method getTActiveThreadDumpList.
private List<TActiveThreadLightDump> getTActiveThreadDumpList(TCmdActiveThreadLightDump request, int limit, List<ActiveTraceInfo> activeTraceInfoList) {
int targetThreadNameListSize = request.getThreadNameListSize();
int localTraceIdListSize = request.getLocalTraceIdListSize();
boolean filterEnable = (targetThreadNameListSize + localTraceIdListSize) > 0;
List<TActiveThreadLightDump> activeThreadDumpList = new ArrayList<TActiveThreadLightDump>(Math.min(limit, activeTraceInfoList.size()));
if (filterEnable) {
for (ActiveTraceInfo activeTraceInfo : activeTraceInfoList) {
if (!ActiveThreadDumpUtils.isTraceThread(activeTraceInfo, request.getThreadNameList(), request.getLocalTraceIdList())) {
continue;
}
TActiveThreadLightDump activeThreadDump = createActiveLightThreadDump(activeTraceInfo);
if (activeThreadDump != null) {
if (limit > activeThreadDumpList.size()) {
activeThreadDumpList.add(activeThreadDump);
}
}
}
} else {
for (ActiveTraceInfo activeTraceInfo : activeTraceInfoList) {
TActiveThreadLightDump activeThreadDump = createActiveLightThreadDump(activeTraceInfo);
if (activeThreadDump != null) {
if (limit > activeThreadDumpList.size()) {
activeThreadDumpList.add(activeThreadDump);
}
}
}
}
return activeThreadDumpList;
}
Aggregations