com.neeve.util
Class UtlThread.ThreadStats

java.lang.Object
  extended by com.neeve.util.UtlThread.ThreadStats
Enclosing class:
UtlThread

public static final class UtlThread.ThreadStats
extends Object

Used by a thread to track stats related to its execution. This class IS NOT supported for use by end users..


Method Summary
 long getAffinityMask()
          Gets the cpu affinitization mask that has been applied for the thread.
 String getAffinityString()
          Gets the cpu affinitization that has been applied for the thread.
 Thread getThread()
          Gets the thread corresponding to these stats.
 long getWaitCount()
          Returns the amount of recorded wait calls that the thread has made.
 long getWaitTime()
          Returns the amount of time in nanoseconds that the thread has spent in recorded wait calls.
 void postWait()
          Called by a thread to record its exit from waiting.
 void preWait()
          Called by a thread to mark that it is entering into wait.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

preWait

public final void preWait()
Called by a thread to mark that it is entering into wait.

This allows the calculation of the time the thread has spent waiting rather than doing actual work.

Threading:
This method can only be called from the tracked thread.

postWait

public final void postWait()
Called by a thread to record its exit from waiting.

Threading:
This method can only be called from the tracked thread.

getThread

public final Thread getThread()
Gets the thread corresponding to these stats.

Returns:
The tracked thread.

getAffinityString

public final String getAffinityString()
Gets the cpu affinitization that has been applied for the thread.

Returns:
The applied affinity mask. If the affinity hasn't been configured for the thread null is returned.
See Also:
UtlThread.parseAffinityMask(String)

getAffinityMask

public final long getAffinityMask()
Gets the cpu affinitization mask that has been applied for the thread.

Returns:
The applied affinity mask. If the affinity hasn't been configured for the thread null is returned.

getWaitTime

public long getWaitTime()
Returns the amount of time in nanoseconds that the thread has spent in recorded wait calls.

Returns:
The time in nanoseconds in recorded wait calls.

getWaitCount

public long getWaitCount()
Returns the amount of recorded wait calls that the thread has made.

Returns:
The number of recorded wait calls for the tracked thread.


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.