public abstract class BasePerfTest extends BaseTestCase
BaseTestCase.MockConnectionConfiguration| Modifier and Type | Field and Description |
|---|---|
private double |
confidenceLevel |
private double |
confidenceValue |
private double |
intervalWidth |
private double |
meanValue |
(package private) static java.text.NumberFormat |
numberFormatter |
private int |
numIterations
The number of iterations that we have performed
|
private double |
squareSumValue |
private double |
sumValue |
private static double[] |
T95
Confidence interval lookup table, indexed by degrees of freedom at 95%.
|
private static double[] |
T99
Confidence interval lookup table, indexed by degrees of freedom at 99%.
|
private java.util.List<java.lang.Double> |
testValuesList
List of values for each iteration
|
private double |
variationValue |
conn, dbClass, dbName, dbUrl, isOpenSSL, mainConnectionUrl, pstmt, rs, serverVersion, stmt, timeZoneFreeDbUrl| Constructor and Description |
|---|
BasePerfTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addResult(double value)
Adds one test result to the statistics.
|
protected void |
doIterations(int num_iterations)
Calls doIteration() the
numIterations times, displaying the mean, std, margin of error and confidence level. |
protected abstract void |
doOneIteration()
Sub-classes should override this to perform the operation to be measured.
|
private double |
getConfidenceLookup() |
protected double |
getCurrentConfidence()
Returns the current confidence level.
|
protected double |
getMarginOfError()
Returns the current margin of error.
|
double |
getMeanValue()
Returns the meanValue.
|
protected double |
getStandardDeviationP()
Returns the current STDDEV.
|
protected void |
reportResults(java.lang.String additionalMessage)
Reports the current results to STDOUT, preceeded by
additionalMessage if not null. |
appendRequiredProperties, assertByteArrayEquals, assertConnectionsHistory, assertEqualsFSAware, assertNonSecureConnection, assertResultSetLength, assertResultSetsEqual, assertSecureConnection, assertSecureConnection, assertSessionStatusEquals, assertThrows, assertThrows, assertThrows, assertThrows, cleanupTempFiles, createDatabase, createDatabase, createFunction, createFunction, createProcedure, createProcedure, createSchemaObject, createSchemaObject, createTable, createTable, createTable, createTable, createUser, createUser, createView, createView, currentTimeMillis, dropDatabase, dropDatabase, dropFunction, dropFunction, dropProcedure, dropProcedure, dropSchemaObject, dropSchemaObject, dropTable, dropTable, dropUser, dropUser, dropView, dropView, fillPrimitiveDefaults, getConnectionWithProps, getConnectionWithProps, getConnectionWithProps, getConnectionWithProps, getEncodedHostFromTestsuiteUrl, getEncodedHostPortPairFromTestsuiteUrl, getFailoverConnection, getFailoverConnection, getHostFreePropertiesFromTestsuiteUrl, getHostFreePropertiesFromTestsuiteUrl, getHostFromTestsuiteUrl, getInstanceNumber, getLoadBalancedConnection, getLoadBalancedConnection, getLoadBalancedConnection, getMysqlVariable, getMysqlVariable, getNewConnection, getNoDbUrl, getPort, getPortFreeHostname, getPortFromTestsuiteUrl, getPropertiesFromTestsuiteUrl, getPropertiesFromUrl, getRowCount, getSingleIndexedValueWithQuery, getSingleIndexedValueWithQuery, getSingleValue, getSingleValueWithQuery, getSourceReplicaReplicationConnection, getSourceReplicaReplicationConnection, getSourceReplicaUrl, getSourceReplicaUrl, getUnreliableFailoverConnection, getUnreliableFailoverConnection, getUnreliableLoadBalancedConnection, getUnreliableLoadBalancedConnection, getUnreliableMultiHostConnection, getUnreliableReplicationConnection, getUnreliableReplicationConnection, getUnreliableReplicationConnection, isClassAvailable, isCommunityEdition, isEnterpriseEdition, isMysqlRunningLocally, isRunningOnJRockit, isServerRunningOnWindows, isSysPropDefined, logDebug, newTempBinaryFile, randomString, removeHostRelatedProps, removeSqlMode, runLongTests, setUpBase, supportsLoadLocalInfile, supportsTestCachingSha2PasswordKeys, supportsTestCertificates, supportsTestSha256PasswordKeys, supportsTimeZoneNames, supportsTLSv1_2, tearDownBase, versionMeetsMinimum, versionMeetsMinimumprivate static final double[] T95
private static final double[] T99
static java.text.NumberFormat numberFormatter
private java.util.List<java.lang.Double> testValuesList
private double confidenceLevel
private double confidenceValue
private double intervalWidth
private double meanValue
private double squareSumValue
private double sumValue
private double variationValue
private int numIterations
public double getMeanValue()
protected abstract void doOneIteration()
throws java.lang.Exception
java.lang.Exceptionprotected double getCurrentConfidence()
protected double getMarginOfError()
protected double getStandardDeviationP()
protected void addResult(double value)
value - a single result representing the value being measured in the test.protected void doIterations(int num_iterations)
throws java.lang.Exception
numIterations times, displaying the mean, std, margin of error and confidence level.num_iterations - the number of iterations to perform ( < 30)java.lang.Exception - if an error occurs.protected void reportResults(java.lang.String additionalMessage)
additionalMessage if not null.additionalMessage - the additional message to print, or null if no message.private double getConfidenceLookup()