zalk 的状态统计
一个 Fabric 模组,用于将硬件、性能和玩家事件记录到游戏日志中,从而更轻松地排查 Bug 和性能问题。
记录内容
启动时(仅一次):
- 环境类型(客户端或服务器)及模组版本
- Fabric Loader 版本
- Java 版本与虚拟机名称
- 操作系统名称、版本及架构
- 可用处理器数量
- JVM 已用内存与最大内存
- CPU 型号、物理/逻辑核心数以及 1 秒 CPU 负载采样
- 总内存与可用内存
硬件探测在后台守护线程上运行,因此 1 秒 CPU 负载采样不再阻塞游戏启动。
仅限客户端:
- 当 FPS 持续 10 秒处于或低于你的阈值时,发出低 FPS 警告。仅记录一次,不会刷屏。
- 当 FPS 回升至恢复阈值以上时,发送一次恢复通知。
- 按你设定的间隔输出 FPS 摘要(平均值与最低值)。
仅限服务器:
- 按你设定的间隔输出 TPS(1 分钟 / 5 分钟 / 15 分钟)
- 专用服务器上,JVM 堆内存使用情况(附带每次报告的增量)
- 玩家加入与断开连接事件
- 服务器启动与停止,以及运行时长
配置
设置保存在 .minecraft/config/zalks-stats.json 中,也可在游戏内通过 Mod Menu 界面进行编辑。建议安装 Mod Menu,但非必需。
| 设置项 | 选项 | 默认值 |
|---|---|---|
| 低 FPS 警告阈值 | 10–90 FPS | 20 |
| FPS 恢复阈值 | 10–120 FPS | 30 |
| FPS 摘要间隔 | 60, 120, 300, 600, 900 秒 | 300 |
| TPS 间隔 | 1, 2, 5, 10, 20, 30 秒 | 5 |
| 堆内存间隔 | 60, 120, 300, 600, 900 秒 | 300 |
| 日志开关 | hardware, environment, FPS, TPS, heap, player join/leave, server lifecycle | 全部开启 |
加载和保存时会对数值进行钳制,因此手动编辑或损坏的配置文件绝不会让模组陷入不合逻辑的状态。恢复阈值始终保持在警告阈值之上,以防止警告立即重新触发。
要求
- Minecraft 26.3
- Fabric Loader 0.19.5 或更高版本
- Java 25 或更高版本
- Fabric API
- Mod Menu(可选,用于提供设置界面)
同时适用于客户端和专用服务器。客户端专属代码不会在服务器上加载。
安装
- 为 Minecraft 26.3 安装 Fabric Loader 和 Fabric API。
- 下载
zalks-stats-1.4.2.jar。 - 将其放入你的
mods文件夹。 - 启动游戏。
构建
git clone https://github.com/zallkyre/zalks-stats.git
cd zalks-stats
./gradlew build
构建生成的 jar 文件位于 build/libs/ 中。需要 Java 25 或更高版本。
许可证
发布于公共领域。请参阅 LICENSE 文件。
zalk's stats
A Fabric mod that logs hardware, performance, and player events to the game log, so bugs and performance problems are easier to trace.
What it logs
At startup, once:
- Environment type (client or server) and mod version
- Fabric Loader version
- Java version and VM name
- OS name, version, and architecture
- Available processors
- JVM memory used vs max
- CPU model, physical/logical core count, and a 1-second CPU load sample
- Total and available RAM
The hardware probe runs on a background daemon thread, so the one-second CPU load sample no longer stalls game start-up.
Client only:
- Low-FPS warning when FPS stays at or below your threshold for 10 seconds. Logged once, not spammed.
- Recovery notice once FPS climbs back to your recovery threshold.
- FPS summary (average and minimum) on your chosen interval.
Server only:
- TPS 1m / 5m / 15m on your chosen interval
- JVM heap usage with per-report delta, on a dedicated server
- Player join and disconnect events
- Server start and stop, with uptime
Configuration
Settings live in .minecraft/config/zalks-stats.json and can be edited in-game from the Mod Menu screen. Mod Menu is suggested, not required.
| Setting | Options | Default |
|---|---|---|
| Low-FPS warning threshold | 10-90 FPS | 20 |
| FPS recovery threshold | 10-120 FPS | 30 |
| FPS summary interval | 60, 120, 300, 600, 900 s | 300 |
| TPS interval | 1, 2, 5, 10, 20, 30 s | 5 |
| Heap interval | 60, 120, 300, 600, 900 s | 300 |
| Log toggles | hardware, environment, FPS, TPS, heap, player join/leave, server lifecycle | all on |
Values are clamped on load and save, so a hand-edited or corrupted config can never leave the mod in a nonsensical state. The recovery threshold is always kept above the warning threshold, so the warning cannot immediately re-arm itself.
Requirements
- Minecraft 26.3
- Fabric Loader 0.19.5 or newer
- Java 25 or newer
- Fabric API
- Mod Menu (optional, for the settings screen)
Works on both the client and a dedicated server. Client-only code is not loaded on a server.
Installation
- Install Fabric Loader and Fabric API for Minecraft 26.3.
- Download
zalks-stats-1.4.2.jar. - Put it in your
modsfolder. - Launch the game.
Building
git clone https://github.com/zallkyre/zalks-stats.git
cd zalks-stats
./gradlew build
The built jar appears in build/libs/. Java 25 or newer is required.
License
Released into the public domain. See the LICENSE file.
下载 zalk's stats
下载 zalk's stats
下载 zalk's stats
下载 zalk's stats
下载 zalk's stats
下载 zalk's stats
下载 zalk's stats
用真实的简介替换占位符模组描述,使文件列表与项目页面一致。不包含任何游戏玩法或配置更改。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧