Skip to content

NPCBenchmarkCommand

Package: com.hypixel.hytale.server.npc.commands

public class NPCBenchmarkCommand extends CommandBase

Implements /npc benchmark. Starts a timed performance benchmark for NPC role ticking or sensor support (position cache) operations. Results are logged to the NPC plugin logger after the benchmark duration completes.

ArgumentTypeRequiredDefaultDescription
--rolesflagnoBenchmark role tick performance
--sensorsupportflagnoBenchmark position cache / line-of-sight performance
secondsDoubleno30.0Duration of the benchmark in seconds (must be > 0)

Exactly one of --roles or --sensorsupport must be provided.

Role benchmark: Calls NPCPlugin.startRoleBenchmark(). On completion, formats a TimeDistributionRecorder table sorted by average tick time per role, plus an aggregate “ALL” row.

Sensor support benchmark: Calls NPCPlugin.startSensorSupportBenchmark(). On completion, formats update times (player and entity) and line-of-sight statistics per role, via SensorSupportBenchmark.

If neither flag is set, the command fails with a start-failed message.

public NPCBenchmarkCommand()

Registers as sub-command "benchmark" with translation key "server.commands.npc.benchmark.desc".

Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.