跳到正文

Worldgen profiling

作者:Misode

Adds custom JFR events to profile world generation

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Creating a JFR report

  1. Launch Minecraft with Fabric.
  2. Download the latest release and add it in the mods folder.
  3. Start by running the /jfr start command and generate new terrain.
  4. Run /jfr stop. This will create a file at .minecraft/debug/client-*.jfr.

Analyzing the JFR report

  1. Download and install the JDK Mission Control tool.
  2. In Mission Control, navigate to File > Open File... and select the JFR report.

jmc_SuUZYxQXXM

  1. Select the Even Browser Page in the Outline.

jmc_rvRbBmPA1r

  1. Find the Minecraft > World Generation > Feature Placement event type, and select it.
  2. Create a new page with just this event type.

jmc_0pSlSrsXNA

  1. Because the JFR file has an event for each feature placement per chunk, it is useful to group events.

jmc_di6ct6Eoin
jmc_HvCkGq9xMT

  1. In this view, you can show average and total durations. It is now really easy to see which features are the bottlenecks.

jmc_FwmZ5h4ZDg
jmc_DxJRDkXVTw

常见问题

Worldgen profiling 支持哪些 Minecraft 版本?

Worldgen profiling 支持 Minecraft Java 版 1.18–1.20.4,共 13 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

Worldgen profiling 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。

评论

登录后评论和评分

Misode 的其他作品

查看全部 →