Make thread id uniformly displayed in decimal format

pull/2663/head
tianshuang 1 year ago committed by hengyunabc
parent 93d8f5c2f1
commit c3c40076fc

@ -89,10 +89,10 @@ public class TraceView extends ResultView<TraceModel> {
//render thread info //render thread info
ThreadNode threadNode = (ThreadNode) node; ThreadNode threadNode = (ThreadNode) node;
//ts=2020-04-29 10:34:00;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@18b4aac2 //ts=2020-04-29 10:34:00;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@18b4aac2
sb.append(format("ts=%s;thread_name=%s;id=%s;is_daemon=%s;priority=%d;TCCL=%s", sb.append(format("ts=%s;thread_name=%s;id=%d;is_daemon=%s;priority=%d;TCCL=%s",
DateUtils.formatDate(threadNode.getTimestamp()), DateUtils.formatDate(threadNode.getTimestamp()),
threadNode.getThreadName(), threadNode.getThreadName(),
Long.toHexString(threadNode.getThreadId()), threadNode.getThreadId(),
threadNode.isDaemon(), threadNode.isDaemon(),
threadNode.getPriority(), threadNode.getPriority(),
threadNode.getClassloader())); threadNode.getClassloader()));

@ -399,7 +399,7 @@ abstract public class ThreadUtil {
public static StackModel getThreadStackModel(ClassLoader loader, Thread currentThread) { public static StackModel getThreadStackModel(ClassLoader loader, Thread currentThread) {
StackModel stackModel = new StackModel(); StackModel stackModel = new StackModel();
stackModel.setThreadName(currentThread.getName()); stackModel.setThreadName(currentThread.getName());
stackModel.setThreadId(Long.toHexString(currentThread.getId())); stackModel.setThreadId(Long.toString(currentThread.getId()));
stackModel.setDaemon(currentThread.isDaemon()); stackModel.setDaemon(currentThread.isDaemon());
stackModel.setPriority(currentThread.getPriority()); stackModel.setPriority(currentThread.getPriority());
stackModel.setClassloader(getTCCL(currentThread)); stackModel.setClassloader(getTCCL(currentThread));

Loading…
Cancel
Save