Interface RegionTps
public interface RegionTps
Represents performance and state information for a scheduler region.
A region corresponds to a group of chunks processed by a dedicated scheduler thread. This interface exposes metrics such as TPS, MSPT, CPU usage, queued tasks and ticket count.
-
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the CPU time consumed by the region thread over the measured window, relative to the wall-clock time elapsed during that same window.doublemsptAvg()Returns the average milliseconds per tick (MSPT) for this region.intReturns the X coordinate of the origin chunk of this region.intReturns the Z coordinate of the origin chunk of this region.intReturns the number of tasks currently queued for this region.intsectionX()Returns the X coordinate of the region section.intsectionZ()Returns the Z coordinate of the region section.inttickets()Returns the number of active tickets associated with this region.doubletps()Returns the current ticks per second (TPS) of this region.world()Returns the Key of the world containing this region.
-
Method Details
-
world
-
sectionX
int sectionX()Returns the X coordinate of the region section.- Returns:
- the region section X coordinate
-
sectionZ
int sectionZ()Returns the Z coordinate of the region section.- Returns:
- the region section Z coordinate
-
originChunkX
int originChunkX()Returns the X coordinate of the origin chunk of this region.- Returns:
- the origin chunk X coordinate
-
originChunkZ
int originChunkZ()Returns the Z coordinate of the origin chunk of this region.- Returns:
- the origin chunk Z coordinate
-
tps
double tps()Returns the current ticks per second (TPS) of this region.The ideal value is
20.0.- Returns:
- the current TPS
-
msptAvg
double msptAvg()Returns the average milliseconds per tick (MSPT) for this region.Lower values indicate better performance. A value around
50.0 mscorresponds to the limit for maintaining 20 TPS.- Returns:
- the average MSPT
-
cpuPercent
double cpuPercent()Returns the CPU time consumed by the region thread over the measured window, relative to the wall-clock time elapsed during that same window.A value of
100.0means the region fully saturates a single CPU core, spending the entire measurement window executing. Values are not capped and may exceed100.0if the region falls behind and accumulates additional work.- Returns:
- the CPU usage of the region, expressed as a percentage of one CPU core
-
queuedTasks
int queuedTasks()Returns the number of tasks currently queued for this region.- Returns:
- the queued task count
-
tickets
int tickets()Returns the number of active tickets associated with this region.Tickets are used internally to keep chunks loaded and scheduled.
- Returns:
- the active ticket count
-