feat(tools): 位痕迹分析输出客户端位游标
This commit is contained in:
1 parent
aaf1554fe9
commit
8444b961c0
1 file changed
+5
-1
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user