Vitals
一款简洁、极简的性能叠加层,专为 Fabric 打造——旨在告诉你游戏不仅运行得有多快,更揭示了是什么导致了卡顿。
显示内容
- FPS — 读取自游戏自身的计数器,因此始终与原版及其他工具保持一致
- 1% low FPS 以及帧时间 p50 / p99 百分位数(那些真正影响流畅感的数值)
- 具有自适应缩放的帧时间折线图 — 尖峰柱状图根据其成因着色
- 服务器刻预算 — 集成服务器(单人游戏)在 50 ms 的刻中使用了多少时间
- 堆内存使用情况和 GC 活动 — 上次暂停持续时间和距上次暂停的时间
- 尖峰归因 — 当发生帧尖峰时,Vitals 会告诉你罪魁祸首:
gc(琥珀色)— 垃圾回收器暂停与帧重叠
tick(蓝色)— 集成服务器刻耗时过长
render(红色)— 其余所有情况(受图形限制)
基准测试
按 F9 可将整个会话(最多 2048 个帧样本 + 汇总统计数据)导出至 .minecraft/vitals/*.csv。标题行以 # 开头,因此 pandas(comment='#')和电子表格软件都能清晰读取。非常适合进行 JVM 标志、模组配置或图形设置的 A/B 测试 — 比较 p99 和 1% low,而非平均值。
F8 切换叠加层的显示状态。按键可在“控制”中重新绑定。
设计原则
- 数字使用中性墨色;颜色仅出现在承载意义的地方(状态点、预算条、尖峰柱)。没有彩虹般的 HUD。
- 零 Mixin — 纯 Fabric API。不会与你其他的 100 个模组产生冲突。
- 近乎零开销:无每帧分配,文本刷新率为 2.5 Hz,全程使用原始环形缓冲区。性能工具绝不能消耗性能。
方法论说明(诚实的小字条款)
自 Minecraft 26.x 起,HUD 渲染已与帧循环解耦,因此 Vitals 采样 游戏自身的每帧计时器,而不是对其回调进行计时。百分位数是统计上有效的估计值;任何长于采样间隔的停顿都会被捕获。尖峰归因是一种基于良好判断的启发式方法,而非分析器证明。对于深度分析,请使用 spark — Vitals 是常驻仪表盘,而非显微镜。
需要 Fabric API 和 Java 25(Minecraft 26.2+)。
Vitals
A clean, minimal performance overlay for Fabric — built to tell you not just how fast
the game runs, but what caused that stutter.
What it shows
- FPS — read from the game's own counter, so it always matches vanilla and other tools
- 1% low FPS and frametime p50 / p99 percentiles (the numbers that actually feel like smoothness)
- Frametime sparkline with adaptive scale — spike bars are colored by their cause
- Server tick budget — how much of the 50 ms tick the integrated server uses (singleplayer)
- Heap usage and GC activity — last pause duration and time since
- Spike attribution — when a frame spike happens, Vitals tells you who did it:
gc (amber) — garbage collector pause overlapped the frame
tick (blue) — the integrated server tick ran long
render (red) — everything else (graphics-bound)
Benchmarking
Press F9 to export the whole session (up to 2048 frame samples + summary statistics)
to .minecraft/vitals/*.csv. Header lines start with #, so pandas
(comment='#') and spreadsheets read it cleanly. Perfect for A/B testing JVM flags,
mod configs, or graphics settings — compare p99 and 1% lows, not averages.
F8 toggles the overlay. Keys are rebindable in Controls.
Design principles
- Numbers wear neutral ink; color only appears where it carries meaning (status dot,
budget bar, spike bars). No rainbow HUD.
- Zero mixins — pure Fabric API. Nothing to conflict with your other 100 mods.
- Near-zero overhead: no per-frame allocations, text refreshes at 2.5 Hz, primitive
ring buffers throughout. A performance tool must not cost performance.
Methodology notes (honest fine print)
Since Minecraft 26.x, HUD rendering is decoupled from the frame loop, so Vitals
samples the game's own per-frame timer instead of timing its callback. Percentiles
are statistically valid estimates; any stall longer than the sampling interval is
always captured. Spike attribution is a well-informed heuristic, not a profiler proof.
For deep profiling, use spark — Vitals is the always-on dashboard, not the microscope.
Requires Fabric API and Java 25 (Minecraft 26.2+).
评论 0
登录后参与评分
还没有评论,来抢沙发吧