|
Kodo 4.2.0 (DEPRECATED) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.lib.jdbc.AbstractJDBCListener
com.solarmetric.jdbc.PerformanceTracker
public class PerformanceTracker
A global tracker of performance-related statistics. All the
performance-related statistics are available as public static
variables which can be accessed directly by an application.
A PerformanceTracker must be added as a JDBCListener
.
Performance statistics are logged whenever a commit occurs. A summary of
performance statistics can be obtained by invoking the static
summarizePerformance()
method at any time.
Field Summary | |
---|---|
static long |
commitMaxTime
The slowest commit made on a Connection . |
static long |
commitMinTime
The fastest commit made on a Connection . |
static long |
commits
The total number of commits made on a Connection . |
static long |
commitTimes
The total time taken on the execution of commits made on all Connection s. |
static long |
executePreparedStatementMaxTime
The slowest PreparedStatement execution. |
static long |
executePreparedStatementMinTime
The fastest PreparedStatement execution. |
static long |
executePreparedStatements
The total number of PreparedStatement s executed. |
static long |
executePreparedStatementTimes
The total time taken on the execution of PreparedStatement s. |
static long |
executeStatementMaxTime
The slowest Statement executions. |
static long |
executeStatementMinTime
The fastest Statement executions. |
static long |
executeStatements
The total number of Statement s that have been executed. |
static long |
executeStatementTimes
The total time for all Statement executions. |
static int |
maxStatementTracking
The number of slow statements we will track. |
static long |
rollbackMaxTime
The slowest rollback made on a Connection . |
static long |
rollbackMinTime
The fastest rollback made on a Connection . |
static long |
rollbacks
The total number of rollbacks made on a Connection . |
static long |
rollbackTimes
The total time taken on the execution of rollbacks made on all Connection s. |
static Map |
slowestStatements
A Map of SQLString : time, to track the slowest statements we have seen. |
static SortedSet |
statementTimes
A cache of the time elements in slowestStatements . |
Constructor Summary | |
---|---|
PerformanceTracker()
|
Method Summary | |
---|---|
void |
afterCommit(JDBCEvent event)
|
void |
afterExecuteStatement(JDBCEvent event)
|
void |
afterRollback(JDBCEvent event)
|
static void |
reset()
Reset all global statistics to their default values. |
static void |
setLog(Log log)
Set the log to write to. |
static String |
summarizePerformance()
|
long |
time(JDBCEvent event)
|
String |
toString()
Summarize the statistics. |
void |
trackSlowStatements(String sql,
long time)
|
Methods inherited from class org.apache.openjpa.lib.jdbc.AbstractJDBCListener |
---|
afterConnect, afterCreateStatement, afterPrepareStatement, afterReturn, beforeClose, beforeCommit, beforeCreateStatement, beforeExecuteStatement, beforePrepareStatement, beforeReturn, beforeRollback, eventOccurred |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static long executeStatements
Statement
s that have been executed.
public static long executeStatementTimes
Statement
executions.
public static long executeStatementMinTime
Statement
executions.
public static long executeStatementMaxTime
Statement
executions.
public static long executePreparedStatements
PreparedStatement
s executed.
public static long executePreparedStatementTimes
PreparedStatement
s.
public static long executePreparedStatementMinTime
PreparedStatement
execution.
public static long executePreparedStatementMaxTime
PreparedStatement
execution.
public static long commits
Connection
.
public static long commitTimes
Connection
s.
public static long commitMinTime
Connection
.
public static long commitMaxTime
Connection
.
public static long rollbacks
Connection
.
public static long rollbackTimes
Connection
s.
public static long rollbackMinTime
Connection
.
public static long rollbackMaxTime
Connection
.
public static int maxStatementTracking
public static Map slowestStatements
public static SortedSet statementTimes
slowestStatements
.
Constructor Detail |
---|
public PerformanceTracker()
Method Detail |
---|
public static void reset()
public static void setLog(Log log)
public void afterExecuteStatement(JDBCEvent event)
afterExecuteStatement
in interface JDBCListener
afterExecuteStatement
in class AbstractJDBCListener
public void trackSlowStatements(String sql, long time)
public void afterCommit(JDBCEvent event)
afterCommit
in interface JDBCListener
afterCommit
in class AbstractJDBCListener
public void afterRollback(JDBCEvent event)
afterRollback
in interface JDBCListener
afterRollback
in class AbstractJDBCListener
public final long time(JDBCEvent event)
public static String summarizePerformance()
public String toString()
toString
in class Object
|
Kodo 4.2.0 (DEPRECATED) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This documentation is deprecated and will be removed in the next release of WebLogic Server.