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 Type
    Method
    Description
    double
    Returns the CPU time consumed by the region thread over the measured window, relative to the wall-clock time elapsed during that same window.
    double
    Returns the average milliseconds per tick (MSPT) for this region.
    int
    Returns the X coordinate of the origin chunk of this region.
    int
    Returns the Z coordinate of the origin chunk of this region.
    int
    Returns the number of tasks currently queued for this region.
    int
    Returns the X coordinate of the region section.
    int
    Returns the Z coordinate of the region section.
    int
    Returns the number of active tickets associated with this region.
    double
    tps()
    Returns the current ticks per second (TPS) of this region.
    Returns the Key of the world containing this region.
  • Method Details

    • world

      Key world()
      Returns the Key of the world containing this region.
      Returns:
      the world key
    • 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 ms corresponds 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.0 means the region fully saturates a single CPU core, spending the entire measurement window executing. Values are not capped and may exceed 100.0 if 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