-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
93 changed files
with
844 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// SPDX-License-Identifier: LGPL-2.1-or-later | ||
// Copyright (c) 2012-2014 Monty Program Ab | ||
// Copyright (c) 2015-2021 MariaDB Corporation Ab | ||
|
||
package org.mariadb.jdbc; | ||
|
||
import org.openjdk.jmh.annotations.Benchmark; | ||
|
||
import java.sql.ResultSet; | ||
import java.sql.Statement; | ||
|
||
public class Do_1 extends Common { | ||
|
||
@Benchmark | ||
public int run(MyState state) throws Throwable { | ||
try (Statement st = state.connectionText.createStatement()) { | ||
return st.executeUpdate("DO 1"); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// SPDX-License-Identifier: LGPL-2.1-or-later | ||
// Copyright (c) 2012-2014 Monty Program Ab | ||
// Copyright (c) 2015-2021 MariaDB Corporation Ab | ||
|
||
package org.mariadb.jdbc; | ||
|
||
import org.openjdk.jmh.annotations.Benchmark; | ||
|
||
import java.sql.Connection; | ||
import java.sql.PreparedStatement; | ||
import java.sql.ResultSet; | ||
|
||
public class Do_1000_params extends Common { | ||
|
||
private static final String sql; | ||
static { | ||
StringBuilder sb = new StringBuilder("do ?"); | ||
for (int i = 1; i < 1000; i++) { | ||
sb.append(",?"); | ||
} | ||
sql = sb.toString(); | ||
} | ||
|
||
@Benchmark | ||
public int text(MyState state) throws Throwable { | ||
return run(state.connectionText); | ||
} | ||
|
||
@Benchmark | ||
public int binary(MyState state) throws Throwable { | ||
return run(state.connectionBinary); | ||
} | ||
|
||
private int run(Connection con) throws Throwable { | ||
|
||
try (PreparedStatement st = con.prepareStatement(sql)) { | ||
for (int i = 1; i <= 1000; i++) { | ||
st.setInt(i, i); | ||
} | ||
return st.executeUpdate(); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
src/benchmark/java/org/mariadb/jdbc/Select_1000_params.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.