Package com.comphenix.protocol.timing
Class TimedTracker
java.lang.Object
com.comphenix.protocol.timing.TimedTracker
Tracks the invocation time for a particular plugin against a list of packets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongBegin tracking an execution time.voidendTracking(long trackingToken, PacketType type) Stop and record the execution time since the creation of the given tracking token.intRetrieve the total number of observations.Retrieve an map (indexed by packet type) of all relevant statistics.
-
Constructor Details
-
TimedTracker
public TimedTracker()
-
-
Method Details
-
beginTracking
public long beginTracking()Begin tracking an execution time.- Returns:
- The current tracking token.
-
endTracking
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
Retrieve an map (indexed by packet type) of all relevant statistics.- Returns:
- The map of statistics.
-