Constructor and Description |
---|
ControlledThreadProfiler()
Constructs a new profiler instance.
|
ControlledThreadProfiler(int pollIntervalInMs)
Constructs a new profiler instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addProfiledThread(java.lang.Thread t)
Adds a thread to be checked by the running profiler.
|
int |
getProfiledThreadCount()
Call to check how many threads are currently being checked by the profiler.
|
boolean |
removedProfiledThread(java.lang.Thread t)
Removed a thread from the set of tracked threads.
|
public ControlledThreadProfiler()
#dump()
with a provided output stream to get the results to.public ControlledThreadProfiler(int pollIntervalInMs)
#dump()
with a provided output stream to get the results to.pollIntervalInMs
- frequency to check running threadspublic void addProfiledThread(java.lang.Thread t)
If the thread is already included, or if the thread is null
, this is a no-op.
t
- Thread to add to the list of tracked threadspublic boolean removedProfiledThread(java.lang.Thread t)
t
- Thread to remove from tracked settrue
if the thread was found and removed.public int getProfiledThreadCount()