Package wt.fc.jmx
Interface TopSQLMonitorMBean
- All Superinterfaces:
SelfEmailingMBean
Provides monitoring of the top, most-expensive SQL statements.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionvoidemailMatchingSQLData(String sqlRegexp, String addressesOrEmailList, String subject) E-mails information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression
Supported API: truelongNumber of calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.doubleElapsed seconds for any single call to a given SQL statement above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.getMatchingSQLData(String sqlRegexp) Returns information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression
Supported API: trueintMaximum number of SQL statements which have not yet reached any threshold to track.doubleMinimum total elapsed seconds for calls to a given SQL statement for it to be included in results reported with INFO (vs.intNumber of most expensive SQL statements to report.doublePercentage of total elapsed SQL call time for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds TotalElapsedSecondsThreshold.Information on the top, most expensive SQL statements thus far in the current measurement interval; does not reset measurement interval
Supported API: truedoubleTotal elapsed seconds for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds PercentTotalElapsedTimeThreshold.intLength of interval in seconds over which SQL statements are to be tracked; at the end of each interval information on the top, most expsensive SQL statements is logged to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.quiet logger.voidReset current measurement interval and log information on the top, most expsensive SQL statements in the previous measurement interval to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.forced logger.voidlogMatchingSQLData(String sqlRegexp) Logs information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression
Supported API: truevoidLogs information on the top, most expensive SQL statements thus far in the current measurement interval; does not reset measurement interval
Supported API: truevoidReset current measurement interval.voidsetCallCountThreshold(long callCountThreshold) Number of calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.voidsetElapsedSecondsThreshold(double elapsedSecondsThreshold) Elapsed seconds for any single call to a given SQL statement above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.voidsetMaxUnderThresholdStatementsToTrack(int maxUnderThresholdStatementsToTrack) Maximum number of SQL statements which have not yet reached any threshold to track.voidsetMinTotalElapsedSecondsToReport(double minTotalElapsedSecondsToReport) Minimum total elapsed seconds for calls to a given SQL statement for it to be included in results reported with INFO (vs.voidsetNumberOfTopStatementsToReport(int numberOfTopStatementsToReport) Number of most expensive SQL statements to report.voidsetPercentTotalElapsedTimeThreshold(double percentTotalElapsedTimeThreshold) Percentage of total elapsed SQL call time for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds TotalElapsedSecondsThreshold.voidsetTotalElapsedSecondsThreshold(double totalElapsedSecondsThreshold) Total elapsed seconds for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds PercentTotalElapsedTimeThreshold.voidsetTrackingIntervalSeconds(int trackingIntervalSeconds) Length of interval in seconds over which SQL statements are to be tracked; at the end of each interval information on the top, most expsensive SQL statements is logged to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.quiet logger.Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Method Details
-
getNumberOfTopStatementsToReport
int getNumberOfTopStatementsToReport()Number of most expensive SQL statements to report.
Supported API: true -
setNumberOfTopStatementsToReport
void setNumberOfTopStatementsToReport(int numberOfTopStatementsToReport) Number of most expensive SQL statements to report.
Supported API: true -
getMinTotalElapsedSecondsToReport
double getMinTotalElapsedSecondsToReport()Minimum total elapsed seconds for calls to a given SQL statement for it to be included in results reported with INFO (vs. DEBUG) level logging.
Supported API: true -
setMinTotalElapsedSecondsToReport
void setMinTotalElapsedSecondsToReport(double minTotalElapsedSecondsToReport) Minimum total elapsed seconds for calls to a given SQL statement for it to be included in results reported with INFO (vs. DEBUG) level logging.
Supported API: true -
getTrackingIntervalSeconds
int getTrackingIntervalSeconds()Length of interval in seconds over which SQL statements are to be tracked; at the end of each interval information on the top, most expsensive SQL statements is logged to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.quiet logger.
Supported API: true -
setTrackingIntervalSeconds
void setTrackingIntervalSeconds(int trackingIntervalSeconds) Length of interval in seconds over which SQL statements are to be tracked; at the end of each interval information on the top, most expsensive SQL statements is logged to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.quiet logger.
Supported API: true -
getMaxUnderThresholdStatementsToTrack
int getMaxUnderThresholdStatementsToTrack()Maximum number of SQL statements which have not yet reached any threshold to track. This is effectively the size of an LRU cache of SQL statements which have not yet been found to be interesting.
Supported API: true -
setMaxUnderThresholdStatementsToTrack
void setMaxUnderThresholdStatementsToTrack(int maxUnderThresholdStatementsToTrack) Maximum number of SQL statements which have not yet reached any threshold to track. This is effectively the size of an LRU cache of SQL statements which have not yet been found to be interesting.
Supported API: true -
getCallCountThreshold
long getCallCountThreshold()Number of calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack. Non-positive values of this attribute imply that no number of calls is sufficient to consider a SQL statement interesting.
Supported API: true -
setCallCountThreshold
void setCallCountThreshold(long callCountThreshold) Number of calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack. Non-positive values of this attribute imply that no number of calls is sufficient to consider a SQL statement interesting.
Supported API: true -
getElapsedSecondsThreshold
double getElapsedSecondsThreshold()Elapsed seconds for any single call to a given SQL statement above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.
Supported API: true -
setElapsedSecondsThreshold
void setElapsedSecondsThreshold(double elapsedSecondsThreshold) Elapsed seconds for any single call to a given SQL statement above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack.
Supported API: true -
getTotalElapsedSecondsThreshold
double getTotalElapsedSecondsThreshold()Total elapsed seconds for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds PercentTotalElapsedTimeThreshold.
Supported API: true -
setTotalElapsedSecondsThreshold
void setTotalElapsedSecondsThreshold(double totalElapsedSecondsThreshold) Total elapsed seconds for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds PercentTotalElapsedTimeThreshold.
Supported API: true -
getPercentTotalElapsedTimeThreshold
double getPercentTotalElapsedTimeThreshold()Percentage of total elapsed SQL call time for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds TotalElapsedSecondsThreshold.
Supported API: true -
setPercentTotalElapsedTimeThreshold
void setPercentTotalElapsedTimeThreshold(double percentTotalElapsedTimeThreshold) Percentage of total elapsed SQL call time for calls to a given SQL statement within an interval above which the statement should be considered interesting enough to obtain a stack trace for and to track without being effected by MaxUnderThresholdStatementsToTrack if it also meets or exceeds TotalElapsedSecondsThreshold.
Supported API: true -
getTopSQLData
Information on the top, most expensive SQL statements thus far in the current measurement interval; does not reset measurement interval
Supported API: true- Throws:
OpenDataException
-
getMatchingSQLData
@MBeanOperationImpact(0) CompositeData getMatchingSQLData(String sqlRegexp) throws OpenDataException Returns information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression
Supported API: true- Parameters:
sqlRegexp- Regular expression (as per java.util.regex.Pattern) used to match SQL statements- Throws:
OpenDataException
-
emailMatchingSQLData
@MBeanOperationImpact(0) void emailMatchingSQLData(String sqlRegexp, String addressesOrEmailList, String subject) throws IOException E-mails information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression
Supported API: true- Parameters:
sqlRegexp- Regular expression (as per java.util.regex.Pattern) used to match SQL statementsaddressesOrEmailList- Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail tosubject- Subject to give e-mail- Throws:
IOException
-
logTopSQLData
Logs information on the top, most expensive SQL statements thus far in the current measurement interval; does not reset measurement interval
Supported API: true -
logMatchingSQLData
Logs information on usage and expense thus far in the current measurement interval of SQL statements that match the given regular expression
Supported API: true- Parameters:
sqlRegexp- Regular expression (as per java.util.regex.Pattern) used to match SQL statements
-
resetTopSQLData
Reset current measurement interval. Information on the top, most expsensive SQL statements in the previous measurement interval is logged to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.quiet logger as would normally occur at the end of a measurement interval.
Supported API: true -
logAndResetTopSQLData
Reset current measurement interval and log information on the top, most expsensive SQL statements in the previous measurement interval to the wt.fc.jmx.TopSQLMonitor.sqlStats.interval.forced logger.
Supported API: true
-