MySQL Ant is an executable Java application that performs load testing on MySQL databases.
This benchmark works iteratively and creates a test database user with a needed count of connections before each testing.
It works in two modes: repeat the SQL script definite count or work during the definite time.
The application analyzed the performance of the database and uses MySQL Performance Schema.
So, the system collects data for these metrics:
- TPS.
- Latency.
- Transactions exceeded max execution time.
- OPS by Performance Schema.
- I/Os by Performance Schema.
- Current memory by Performance Schema.
- Total memory by Performance Schema.
- Count of table scans by Performance Schema.
- Latency by Performance Schema.
The system uses a YAML file for work and contains two logical blocks:
- Benchmark
benchmark:
client:
count: Integer
max: Integer
step: Integer
transaction:
count: Integer
max: Integer
step: Integer
time:
count: Long
max: Long
step: Long
execution:
maxTime: Long
timeout: Integer
parallel: Boolean
script:
name: String
report:
path: String
name: String
The application uses milliseconds as a time unit in the time block. time.max field is a value in milliseconds that responds to count all transactions which exceed it. MySQL Ant reads the SQL file by script.name field and saves results to the HTML file - report.path/report.name. 2. MySQL datasource configuration
mysql:
username:
password:
driverName:
url:
To start the application you need to execute these commands:
- Create a JAR archive.
mvn clean package
- Create configuration file - application.yaml in the same directory with the archive.
- Create an SQL file that you specify in the configuration.
- Run the application by this command:
java -jar mysql_ant.jar
MySQL Ant generates results as an HTML file specified in the configuration. It consists of 3D graphics for each analyzed metric.