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: