|
Dashboard Builder Commons 6.0.0.Beta3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dashboard.profiler.ThreadProfile
public class ThreadProfile
A thread profile holds detailed information about the execution of a given thread. It holds informations like:
| Nested Class Summary | |
|---|---|
static class |
ThreadProfile.CodeBlockBeginEvent
The CodeBlockTrace begin event. |
static class |
ThreadProfile.CodeBlockEndEvent
The CodeBlockTrace end event. |
static class |
ThreadProfile.Log4JEvent
Class that holds events generated by the Log4j. |
static class |
ThreadProfile.LogEvent
Base class for log events. |
static class |
ThreadProfile.MessageEvent
A simple event holding a message. |
| Field Summary | |
|---|---|
protected Date |
beginDate
The begin date |
protected CodeBlockTrace |
codeBlockInProgress
The current block in execution |
protected Map<String,Object> |
contextProperties
Context properties collected during profiling. |
protected static List<String> |
contextPropertyNames
All context property names that any thread profile can hold. |
protected boolean |
elapsedTimeExceeded
Flag indicating that the thread elapsed time has overtaken a specified threshold (See the maxThreadDurationInMillis property). |
protected Date |
endDate
The end date |
protected ErrorReport |
errorReport
An error occurred during the thread execution (if any). |
protected String |
id
The identifier |
protected int |
largeStackTracesCount
Number of large stack traces captured fot this thread |
protected List<ThreadProfile.LogEvent> |
logEvents
The thread's logs |
protected boolean |
logOverflow
The log overflow flag. |
protected int |
maxLogEvents
The maximum log events to store. |
protected int |
maxStackTraceLength
Maximum stack trace length allowed. |
protected long |
maxThreadDurationInMillis
Maximum thread length allowed. |
protected CodeBlockTrace |
rootCodeBlock
The root trace. |
protected List<StackTrace> |
stackTraces
Stack trace samples captured by the profiler. |
protected boolean |
stackTraceTooLarge
Flag indicating that a too large stack trace (defined by the maxStackTraceLength property) has been produced by this thread. |
static String |
STATE_COMPLETED
|
static String |
STATE_ERROR
|
protected boolean |
targetThread
Force this thread to be kept by the profiler within the list of target threads. |
protected Thread |
thread
The thread |
static String |
THREAD_BEGIN_DATE
|
static String |
THREAD_GROUP
|
static String |
THREAD_ID
|
static String |
USER_LOGIN
|
static String |
USER_NAME
|
| Constructor Summary | |
|---|---|
ThreadProfile()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String id
protected Date beginDate
protected Date endDate
protected Thread thread
protected CodeBlockTrace rootCodeBlock
protected CodeBlockTrace codeBlockInProgress
protected List<StackTrace> stackTraces
protected long maxThreadDurationInMillis
protected int maxStackTraceLength
protected boolean elapsedTimeExceeded
maxThreadDurationInMillis property).
protected boolean stackTraceTooLarge
maxStackTraceLength property) has been produced by this thread.
protected int largeStackTracesCount
protected Map<String,Object> contextProperties
protected static List<String> contextPropertyNames
protected List<ThreadProfile.LogEvent> logEvents
protected int maxLogEvents
protected transient boolean logOverflow
protected ErrorReport errorReport
protected boolean targetThread
public static final String THREAD_ID
public static final String THREAD_BEGIN_DATE
public static final String THREAD_GROUP
public static final String USER_LOGIN
public static final String USER_NAME
public static final String STATE_ERROR
public static final String STATE_COMPLETED
| Constructor Detail |
|---|
public ThreadProfile()
| Method Detail |
|---|
public String getId()
public void setId(String id)
public Date getBeginDate()
public Date getEndDate()
public long getElapsedTime()
public Thread getThread()
public boolean isRunning()
public long getMaxThreadDurationInMillis()
public void setMaxThreadDurationInMillis(long maxThreadDurationInMillis)
public int getMaxStackTraceLength()
public void setMaxStackTraceLength(int maxStackTraceLength)
public boolean isElapsedTimeExceeded()
public boolean isStackTraceTooLarge()
public CodeBlockTrace getCodeBlockInProgress()
public CodeBlockTrace getRootCodeBlock()
public int getMaxLogEvents()
public void setMaxLogEvents(int maxLogEvents)
public ErrorReport getErrorReport()
public void setErrorReport(ErrorReport errorReport)
public String getState()
public void addContextProperty(String propName,
Object propValue)
public void addContextProperties(Map<String,Object> props)
public Object getContextProperty(String propName)
public Set<String> getContextPropertyNames()
public static List<String> getAllContextPropertyNames()
public boolean isTargetThread()
public void setTargetThread(boolean targetThread)
public void begin()
public void end()
public static String printStackTrace(Thread t,
int lines)
public String printContext()
public int getNumberOfSamples()
public long getSampleAverageTimeMillis()
public void clearStackTraces()
public void dumpStackTrace()
public long getProfileTimeMillis()
public List<TimeTrace> calculateTimeTraces()
protected List<TimeTrace> calculateTimeTraces(int sampleStart,
int sampleEnd,
int stackLevel)
protected TimeTrace createTimeTrace(int traceStart,
int traceEnd,
int stackLevel)
protected void toPlainList(List<TimeTrace> traces,
List<TimeTrace> results)
public void addLog4JEvent(org.apache.log4j.spi.LoggingEvent event)
public void addCodeBlockBeginEvent(CodeBlockTrace trace)
public void addCodeBlockEndEvent(CodeBlockTrace trace)
public void addLogEvent(ThreadProfile.LogEvent event)
protected ThreadProfile.MessageEvent createLogOverflowMessage()
public List<ThreadProfile.LogEvent> getLogEvents(boolean includeCodeBlockEvents,
boolean removeCodeBlocksWithoutLogs)
|
Dashboard Builder Commons 6.0.0.Beta3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||