[1148] telemetry 实现迁移至 telemetry 插件(启动 434ms → 416ms)#4038
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- TeXmacs/progs/telemetry/ → TeXmacs/plugins/telemetry/progs/plugin/ 作为 (plugin telemetry-*) 模块,由插件 init 在事件循环 ~3s 后懒加载 - init-research.scm 移除 eager 加载;顶部注入 rootlet 的 telemetry-pending-events / telemetry-track-or-enqueue / telemetry-drain-pending!,让启动期 C++ 上报(OPEN/LOGIN 等)不丢失 - src/Mogan/Telemetry/telemetry.hpp C++ 调用改为 telemetry-track-or-enqueue,插件加载前入队、加载后由 init-telemetry 内的 telemetry-drain-pending! 一次性补 track - init-telemetry / track-event 由 define-public 改 tm-define 以绑定 rootlet - generic-edit.scm 调用点 (when (defined? 'track-event) ...) 兜底 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TeXmacs/progs/telemetry/迁到TeXmacs/plugins/telemetry/progs/plugin/,由插件在事件循环 ~3s 后懒加载,不在启动关键路径上init-research.scm顶部注入 rootlet 的 pending 队列(telemetry-pending-events/telemetry-track-or-enqueue/telemetry-drain-pending!),让启动期 C++ 上报(OPEN/LOGIN/HEART_BEAT)经队列在插件加载后由init-telemetry内的telemetry-drain-pending!一次性补 track,关键事件 0 丢失src/Mogan/Telemetry/telemetry.hpp改为eval_scheme("(telemetry-track-or-enqueue ...)");init-telemetry/track-event由define-public改tm-define以绑定 rootletTest plan
xmake b stem编译通过Starting event loop... (416 ms)(1146 基线 434 ms),日志可见 enqueue LOGIN/OPEN → drain 2 pending events → track LOGIN/OPEN → init: enabledxmake r 200_64:92 correct, 0 failedxmake r 2013:9 correct, 0 failedgf fmt --changed-since=main全部已格式化🤖 Generated with Claude Code