chore(trace): 在 ReduxToModelGateway.dispatch 打点动作 toString
yt.uar 是全包唯一的真实 dispatch 入口;动作类 toString 形如 SetFragsCount(fragsCount=3),据此反推动作名/字段名/字段值类型(action_trace.json)。打点只在镜像副本里,落地走 /__dump__/action_trace.json。
This commit is contained in:
1 parent
85f180f331
commit
37be0e2418
1 file changed
+27
@@ -563,6 +563,33 @@
|
||||
null == i || (R(i, L) ? i : $()).c3(n);
|
||||
}),
|
||||
(p(yt).uar = function (t) {
|
||||
// [Hornet 调试] 动作全量打点:这是唯一的 dispatch 入口(ReduxToModelGateway.dispatch)。
|
||||
// 动作类的 toString 形如 "SetFragsCount(fragsCount=3)",直接记原文就能反推
|
||||
// 「动作名 + 字段名 + 字段值」,再据此定字段类型(与 TankState 那次同一套路)。
|
||||
try {
|
||||
if (typeof window !== "undefined") {
|
||||
var T0 = (window.__HornetActionTrace__ = window.__HornetActionTrace__ || {
|
||||
rows: [], timer: 0,
|
||||
push: function (Row) {
|
||||
if (this.rows.length >= 40000) return;
|
||||
this.rows.push(Row);
|
||||
if (!this.timer) {
|
||||
var Me = this;
|
||||
this.timer = setTimeout(function () {
|
||||
Me.timer = 0;
|
||||
try {
|
||||
fetch("/__dump__/action_trace.json", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ at: new Date().toISOString(), count: Me.rows.length, trace: Me.rows }),
|
||||
});
|
||||
} catch (E2) {}
|
||||
}, 1500);
|
||||
}
|
||||
},
|
||||
});
|
||||
T0.push({ s: String(t) });
|
||||
}
|
||||
} catch (E4) {}
|
||||
var n, i;
|
||||
this.xar_1(
|
||||
new I(
|
||||
|
||||
Reference in new issue
Block a user