跳到正文

EventTimer

作者:CoolSquid

Records how long event handlers take to execute.

收藏

介绍

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

EventTimer records the time used by each event handler in each mod. The data is automatically logged when the game shuts down and when the commands “eventtimer log” or “eventtimerclient log” are run.

 

Log file

The data is logged to “eventtimer.csv”. This is a CSV file, which is, essentially, a text file where data is stored in multiple comma-separated columns. It can be opened in a normal text editor or a spreadsheet program, such as LibreOffice Calc or Microsoft Excel.

 

The file has the following format:

Mod id,Event handler,Count,Total time (ns),Total time (ms)
forge,ASM: net.minecraftforge.common.ForgeInternalHandler@5816fd13 checkSettings(Lnet/minecraftforge/fml/common/gameevent/TickEvent$ClientTickEvent:)V,4658,19807885,19
misctweaks,ASM: coolsquid.misctweaks.handler.ModEventHandler@706b5d5e onStarve(Lnet/minecraftforge/event/entity/living/LivingAttackEvent:)V,2414,8042152,8

A complete example may be found here.

 

Commands

EventTimer provides two commands, both of which dump the data to the log.

  • /eventtimer is available in local worlds and in multiplayer worlds where the user is an OP. If used on a server, it affects the server, not the client.
    • /eventtimer log
    • /eventtimer reset
  • /eventtimerclient is only available in multiplayer worlds. It affects the client, not the server.

常见问题

EventTimer 支持哪些 Minecraft 版本?

EventTimer 支持 Minecraft Java 版 1.12.2,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

EventTimer 怎么安装?

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

评论

登录后评论和评分

CoolSquid 的其他作品

查看全部 →