feat(protocol): 采集客户端 opt<list> 位痕迹并加分析脚本
This commit is contained in:
1 parent
fafdb91a04
commit
97917478a4
2 files changed
+156
No files matched your search
@@ -413,6 +413,43 @@
|
||||
null == n ? t.f7h_1.b7h(!0) : (t.f7h_1.b7h(!1), this.r7h_1.s7h(t, n));
|
||||
}),
|
||||
(z(Ht).t7h = function (t) {
|
||||
// [Hornet 调试] 可选读器的位痕迹采样:只对「可选 + 列表」这类罕见的组合记录
|
||||
// (判据:内层读器带列表槽位 z7h_1),把位值、内层读器类名、调用栈节流 POST 到
|
||||
// /__dump__/nullmap_trace.json,用于确认 opt<list<…>> 在真实数据里到底占不占位。
|
||||
// 位只读一次:采样失败也只是少一条日志,绝不改变解码结果。
|
||||
var Inner = this.r7h_1;
|
||||
if (Inner && Inner.z7h_1 !== undefined) {
|
||||
var B0 = t.f7h_1.xy();
|
||||
try {
|
||||
if (typeof window !== "undefined") {
|
||||
var T = (window.__HornetBitTrace__ = window.__HornetBitTrace__ || {
|
||||
rows: [], sent: 0, timer: 0,
|
||||
push: function (Row) {
|
||||
if (this.rows.length >= 4000) return;
|
||||
this.rows.push(Row);
|
||||
if (!this.timer) {
|
||||
var Me = this;
|
||||
this.timer = setTimeout(function () {
|
||||
Me.timer = 0;
|
||||
try {
|
||||
fetch("/__dump__/nullmap_trace.json", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ at: new Date().toISOString(), count: Me.rows.length, trace: Me.rows }),
|
||||
});
|
||||
} catch (E2) {}
|
||||
}, 1500);
|
||||
}
|
||||
},
|
||||
});
|
||||
var St = "";
|
||||
try {
|
||||
St = String(new Error().stack || "").split("\n").slice(1, 4).join(" | ");
|
||||
} catch (E3) {}
|
||||
T.push({ bit: B0, inner: Inner.constructor && Inner.constructor.name, stack: St });
|
||||
}
|
||||
} catch (E4) {}
|
||||
return B0 ? null : Inner.t7h(t);
|
||||
}
|
||||
return t.f7h_1.xy() ? null : this.r7h_1.t7h(t);
|
||||
}),
|
||||
(z(Ht).u7h = function (t) {
|
||||
|
||||
Reference in new issue
Block a user