Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ The benchmarks do not measure the performance of target JDBC drivers nor the per
## Usage
1. Build the benchmarks with the following command `../gradlew jmhJar`.
1. the JAR file will be outputted to `build/libs`
2. Run the benchmarks with the following command `java -jar build/libs/benchmarks-1.0.0-jmh.jar`.
2. Run the benchmarks with the following command `java -jar build/libs/benchmarks-1.0.1-jmh.jar`.
1. you may have to update the command based on the exact version of the produced JAR file
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public void initAndReleaseBaseLine() throws SQLException {
}

@Benchmark
public ConnectionWrapper initAndReleaseWithAllPlugins() throws SQLException {
public ConnectionWrapper initAndReleaseWithExecutionTimePlugin() throws SQLException {
try (ConnectionWrapper wrapper = new ConnectionWrapper(
useAllPlugins(),
useExecutionTimePlugin(),
CONNECTION_STRING,
mockConnectionProvider)) {
wrapper.releaseResources();
Expand All @@ -124,9 +124,9 @@ public ConnectionWrapper initAndReleaseWithAllPlugins() throws SQLException {
}

@Benchmark
public ConnectionWrapper initAndReleaseWithExecutionTimePlugin() throws SQLException {
public ConnectionWrapper initAndReleaseWithAuroraHostListPlugin() throws SQLException {
try (ConnectionWrapper wrapper = new ConnectionWrapper(
useExecutionPlugin(),
useAuroraHostListPlugin(),
CONNECTION_STRING,
mockConnectionProvider)) {
wrapper.releaseResources();
Expand All @@ -135,9 +135,9 @@ public ConnectionWrapper initAndReleaseWithExecutionTimePlugin() throws SQLExcep
}

@Benchmark
public ConnectionWrapper initAndReleaseWithAuroraHostListPlugin() throws SQLException {
public ConnectionWrapper initAndReleaseWithExecutionTimeAndAuroraHostListPlugins() throws SQLException {
try (ConnectionWrapper wrapper = new ConnectionWrapper(
useAuroraHostList(),
useExecutionTimeAndAuroraHostListPlugins(),
CONNECTION_STRING,
mockConnectionProvider)) {
wrapper.releaseResources();
Expand Down Expand Up @@ -196,7 +196,7 @@ public ConnectionWrapper initAndReleaseWithReadWriteSplittingPluginWithReaderLoa
@Benchmark
public Statement executeStatementBaseline() throws SQLException {
try (ConnectionWrapper wrapper = new ConnectionWrapper(
useExecutionPlugin(),
useExecutionTimePlugin(),
CONNECTION_STRING,
mockConnectionProvider);
Statement statement = wrapper.createStatement()) {
Expand All @@ -208,7 +208,7 @@ public Statement executeStatementBaseline() throws SQLException {
public ResultSet executeStatementWithExecutionTimePlugin() throws SQLException {
try (
ConnectionWrapper wrapper = new ConnectionWrapper(
useExecutionPlugin(),
useExecutionTimePlugin(),
CONNECTION_STRING,
mockConnectionProvider);
Statement statement = wrapper.createStatement();
Expand All @@ -217,21 +217,21 @@ public ResultSet executeStatementWithExecutionTimePlugin() throws SQLException {
}
}

Properties useAllPlugins() {
Properties useExecutionTimePlugin() {
final Properties properties = new Properties();
properties.setProperty("wrapperPlugins", "executionTime,auroraHostList");
properties.setProperty("wrapperPlugins", "executionTime");
return properties;
}

Properties useExecutionPlugin() {
Properties useAuroraHostListPlugin() {
final Properties properties = new Properties();
properties.setProperty("wrapperPlugins", "executionTime");
properties.setProperty("wrapperPlugins", "auroraHostList");
return properties;
}

Properties useAuroraHostList() {
Properties useExecutionTimeAndAuroraHostListPlugins() {
final Properties properties = new Properties();
properties.setProperty("wrapperPlugins", "auroraHostList");
properties.setProperty("wrapperPlugins", "executionTime,auroraHostList");
return properties;
}

Expand Down
1 change: 1 addition & 0 deletions docs/development-guide/DevelopmentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ These benchmarks do not make actual connections to the databases and use simple
The goal of these benchmarks is to measure the overhead of using the AWS JDBC Driver with multiple plugins enabled.
![](../images/jdbc_wrapper_connect_execute_pipelines_benchmarks.png)
![](../images/jdbc_wrapper_pipelines_benchmarks.png)
![](../images/jdbc_wrapper_init_release_pipelines_benchmarks.png)

See [here](EFMAndFailoverPluginPerformanceResults.md#benchmarks) for a more detailed performance breakdown.

Expand Down
20 changes: 12 additions & 8 deletions docs/development-guide/EFMAndFailoverPluginPerformanceResults.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@
| releaseResourcesWithNoPlugins | 8.030 | 3.776 | us/op |
| releaseResourcesTenGenericPlugins | 15.243 | 4.906 | us/op |

| Benchmark | Score | Error | Units |
|-----------------------------------------------------------|----------|---------|-------|
| executeStatementBaseline | 706.629 | 139.833 | us/op |
| executeStatementWithExecutionTimePlugin | 1037.951 | 187.424 | us/op |
| initAndReleaseBaseLine | 0.667 | 0.140 | us/op |
| initAndReleaseWithAllPlugins | 668.783 | 118.127 | us/op |
| initAndReleaseWithAuroraHostListPlugin | 667.868 | 122.335 | us/op |
| initAndReleaseWithExecutionTimePlugin | 679.230 | 136.899 | us/op |
| Benchmark | Score | Error | Units |
|------------------------------------------------------------------------------------|----------|---------|-------|
| executeStatementBaseline | 912.928 | 137.285 | us/op |
| executeStatementWithExecutionTimePlugin | 1739.314 | 286.132 | us/op |
| initAndReleaseBaseLine | 1.132 | 1.123 | us/op |
| initAndReleaseWithAuroraHostListAndReadWriteSplittingPlugin | 1562.297 | 245.078 | us/op |
| initAndReleaseWithAuroraHostListAndReadWriteSplittingPluginWithReaderLoadBalancing | 1519.943 | 243.188 | us/op |
| initAndReleaseWithAuroraHostListPlugin | 964.033 | 149.767 | us/op |
| initAndReleaseWithExecutionTimeAndAuroraHostListPlugins | 1005.531 | 165.567 | us/op |
| initAndReleaseWithExecutionTimePlugin | 804.334 | 150.357 | us/op |
| initAndReleaseWithReadWriteSplittingPlugin | 870.167 | 158.707 | us/op |
| initAndReleaseWithReadWriteSplittingPluginWithReaderLoadBalancing | 867.317 | 149.344 | us/op |

## Performance Tests

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.