From 8444b961c0b67fe7c2ad356e0d610272d05feee9 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Wed, 21 Oct 2026 03:02:13 +0800 Subject: [PATCH] =?UTF-8?q?feat(tools):=20=E4=BD=8D=E7=97=95=E8=BF=B9?= =?UTF-8?q?=E5=88=86=E6=9E=90=E8=BE=93=E5=87=BA=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E4=BD=8D=E6=B8=B8=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3DTank/tools/analyze_nullmap_trace.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/3DTank/tools/analyze_nullmap_trace.py b/3DTank/tools/analyze_nullmap_trace.py index 329e51a..4ac587c 100644 --- a/3DTank/tools/analyze_nullmap_trace.py +++ b/3DTank/tools/analyze_nullmap_trace.py @@ -78,10 +78,14 @@ def Main(): ElemName = Elems[0][1] if len(Elems) == 1 else Group[0].get('elem') Owners = FindOwners(Codecs, ElemName) if ElemName else [] Bits = Counter(R.get('bit') for R in Group) - Seq = ''.join(str(R.get('bit')) for R in Group[:40]) + Pos = [R.get('pos') for R in Group if isinstance(R.get('pos'), int) and R.get('pos') >= 0] + Seq = ''.join('1' if R.get('bit') else '0' for R in Group[:40]) Where = (Owners[0][0] + ' . ' + str(Owners[0][1])) if len(Owners) == 1 else '?' print(' hid=%-4s 次数=%-4d bit0=%-4d bit1=%-4d 元素=%-22s 字段=%s' % (Hid, len(Group), Bits.get(0, 0), Bits.get(1, 0), ElemName or '?', Where)) + if Pos: + print(' 客户端位游标 pos:首个=%d 最后=%d 前 12 个=%s' + % (Pos[0], Pos[-1], ','.join(str(P) for P in Pos[:12]))) if len(Seq) >= 4: print(' 位序列:' + Seq) if len(Elems) > 1: