Class TimedTracker

java.lang.Object
com.comphenix.protocol.timing.TimedTracker

public class TimedTracker extends Object
Tracks the invocation time for a particular plugin against a list of packets.
Author:
Kristian
  • Constructor Details

    • TimedTracker

      public TimedTracker()
  • Method Details

    • beginTracking

      public long beginTracking()
      Begin tracking an execution time.
      Returns:
      The current tracking token.
    • endTracking

      public void endTracking(long trackingToken, PacketType type)
      Stop and record the execution time since the creation of the given tracking token.
      Parameters:
      trackingToken - - the tracking token.
      type - - the packet type.
    • getObservations

      public int getObservations()
      Retrieve the total number of observations.
      Returns:
      Total number of observations.
    • getStatistics

      public Map<PacketType,​StatisticsStream> getStatistics()
      Retrieve an map (indexed by packet type) of all relevant statistics.
      Returns:
      The map of statistics.