概览
ATHENA 是一款易于使用且信息丰富的服务端事件调试工具,面向服务器管理员和插件开发者,旨在兼顾终端用户的友好性与稳健性。
要求
- Java 16
- Minecraft 1.17 或更高版本
- Paper,或其任何分支版本。
命令
/athena listen <Event Name> - 开始监听特定事件。如果失败,请包含完整的包名。
/athena listeners <Event Name|Plugin> - 列出监听给定事件的所有插件,或列出给定插件中所有活跃的监听器。
/athena stop [Event Name] - 停止监听特定事件;如果不指定名称,则停止监听所有事件。
/athena lookup <Command> - 查找命令的来源及其运行权限。
权限
athena.command.stop - 访问 /athena stop 的权限。
athena.command.lookup - 访问 /athena lookup 的权限。
athena.command.listen - 访问 /athena listen 的权限。
athena.command.listeners - 访问 /athena listeners 的权限。
重要说明与免责声明
ATHENA 在设计时充分考虑了可用性、稳定性和细节。然而,性能并非该插件的首要优先级。尽管我已运用大部分专业知识尽可能优化插件,但不建议在非必要时运行 ATHENA。该插件大量使用反射机制来运作并从事件中收集数据,这本身可能会对性能造成一定影响。此外,虽然 ATHENA 不会(或至少尝试不)干扰各个插件的监听器,但它可能会影响这些监听器在 Paper 的 Timings 中显示的优化程度。如果你正在使用 Timings 和 ATHENA 测量事件性能,建议分别进行测量(例如:先执行 /timings paste,然后使用 ATHENA 查看某次运行的完成时间)。
如果你是正在测量监听器耗时的服务器管理员,仅当单个监听器的完成时间超过 40ms 时才需关注性能问题。Minecraft 中单个刻(tick)耗时 50ms,因此 20 TPS 是服务器应追求的重要指标。请勿仅仅因为某个插件的监听器耗时最长而频繁催促插件开发者;有些插件需要执行的任务确实比其他插件更多。此外,spark 分析/性能分析报告以及 Timings 数据可能比 ATHENA 提供的单一片段更有参考价值。
如果 ATHENA 无法监听特定事件或在尝试监听时崩溃,请在提交 Issue 时附带该事件的相关信息。如果该事件来自某个插件,请尽量提供该事件的类名。
如果 ATHENA 出现错误,它仍应允许其控制的监听器正常运行,因此不应影响其他插件的功能。
异步执行的事件可能无法获取插件来源信息。
欢迎提交 PR 和建议以改进插件——包括其性能。
Overview
ATHENA is an easy-to-use and informative event debugger for server owners and plugin developers alike, with aims at being end-user friendly and robust.
Requirements
- Java 16
- Minecraft 1.17 or newer
- Paper, or any of its forks.
Commands
/athena listen <Event Name> - start listening to a specific event. If this fails, you need to include the full package.
/athena listeners <Event Name|Plugin> - lists all the plugins listening to a given event, or all of the active listeners in a given plugin.
/athena stop [Event Name] - stops listening to a specific event, or all of them if you specify nothing.
/athena lookup <Command> - finds the source of a command, as well as its permission to run.
Permissions
athena.command.stop - access to /athena stop.
athena.command.lookup - access to /athena lookup.
athena.command.listen - access to /athena listen.
athena.command.listeners - access to /athena listeners.
Important notes and disclaimers
ATHENA is made with usability, stability and detail in mind. However, performance is not necessarily a priority with the plugin. Whilst I have applied the majority of my knowledge to make the plugin as optimised as possible, it is not recommended to run ATHENA when you don't need it. The plugin uses a considerable amount of reflection to function and collect data from events, which in itself can take a hit on performance. In addition, whilst ATHENA does not (or at least tries to not) interfere with individual plugin listeners, it may have an impact on how optimised they may appear in Paper's Timings. If you are measuring event performance using Timings and ATHENA, it is recommended to take separate measurements (e.g. /timings paste first, then use ATHENA to see completion times on one occasion).
If you are a server owner measuring listener durations, you should only be concerned about performance if a single listener exceeds 40ms of completion time. A single tick in Minecraft takes 50ms, hence why 20 TPS is an important number to aim for in servers. Please do not nag plugin developers if their listeners' time simply takes the longest; some plugins need to carry out more tasks than others. In addition, a spark/profiling report as well as timings may be more helpful than a single snippet from ATHENA.
If ATHENA is unable to listen to a specific event or crashes when you attempt to do so, please open an issue with the event. If it is an event from a plugin, please send the class of the event where possible.
If ATHENA experiences an error, it should still let the listeners it has control over run so it should not have an impact on other plugins' functionality.
Events that execute asynchronously may not be able to pick up the plugin source.
PRs and suggestions on how to improve the plugin - including its performance - are more than welcome.
评论 0
登录后参与评分
还没有评论,来抢沙发吧