Class TPS

  • All Implemented Interfaces:
    DateHolder

    public class TPS
    extends java.lang.Object
    implements DateHolder
    Class containing single datapoint of TPS / Players online / CPU Usage / Used Memory / Entity Count / Chunks loaded.
    • Constructor Summary

      Constructors 
      Constructor Description
      TPS​(long date, double ticksPerSecond, int players, double cpuUsage, long usedMemory, int entityCount, int chunksLoaded, long freeDiskSpace)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int getChunksLoaded()
      Get the amount of chunks loaded for the time, when the data was fetched
      double getCPUUsage()
      Get the average CPU Usage for the minute
      long getDate()
      Get the date the object holds.
      int getEntityCount()
      Get the amount of entities for the time, when the data was fetched
      long getFreeDiskSpace()
      Get free megabytes of disk space on the server disk.
      int getPlayers()
      Get the player for the time, when the data was fetched.
      double getTicksPerSecond()
      Get the average ticksPerSecond for the minute.
      long getUsedMemory()
      Get the used memory for the time, when the data was fetched.
      int hashCode()  
      java.lang.Number[] toArray()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TPS

        public TPS​(long date,
                   double ticksPerSecond,
                   int players,
                   double cpuUsage,
                   long usedMemory,
                   int entityCount,
                   int chunksLoaded,
                   long freeDiskSpace)
        Constructor.
        Parameters:
        date - time of the TPS calculation.
        ticksPerSecond - average ticksPerSecond for the last minute.
        players - players for the minute.
        cpuUsage - CPU usage for the minute
        usedMemory - used memory (megabytes) at the time of fetching
        entityCount - amount of entities at the time of fetching
        chunksLoaded - amount of chunks loaded at the time of fetching
        freeDiskSpace - free megabytes in the partition the server is running in.
    • Method Detail

      • getDate

        public long getDate()
        Description copied from interface: DateHolder
        Get the date the object holds.
        Specified by:
        getDate in interface DateHolder
        Returns:
        Epoch ms - milliseconds passed since January 1st 1970.
      • getTicksPerSecond

        public double getTicksPerSecond()
        Get the average ticksPerSecond for the minute.
        Returns:
        0-20 double
      • getPlayers

        public int getPlayers()
        Get the player for the time, when the data was fetched.
        Returns:
        Players online.
      • getCPUUsage

        public double getCPUUsage()
        Get the average CPU Usage for the minute
        Returns:
        0-100 double
      • getUsedMemory

        public long getUsedMemory()
        Get the used memory for the time, when the data was fetched.
        Returns:
        Used Memory in Megabyte
      • getEntityCount

        public int getEntityCount()
        Get the amount of entities for the time, when the data was fetched
        Returns:
        Amount of entities
      • getChunksLoaded

        public int getChunksLoaded()
        Get the amount of chunks loaded for the time, when the data was fetched
        Returns:
        Amount of chunks loaded
      • getFreeDiskSpace

        public long getFreeDiskSpace()
        Get free megabytes of disk space on the server disk.
        Returns:
        Amount of free megabytes available on disk.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toArray

        public java.lang.Number[] toArray()