Skip to content

Commit

Permalink
[misc] update benchmark result for 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Feb 3, 2023
1 parent 5500df2 commit f6861e5
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 162 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,22 @@ See the [Benchmarks](./documentation/benchmarks.md) page for multiple results.

```
select 100 int
mysql : 2,364.7 ops/s ± 1.6%
mysql2 : 1,977.8 ops/s ± 1.9% ( -16.4% )
mariadb : 3,869 ops/s ± 2.5% ( +63.6% )
mysql : 2,738.7 ops/s ± 1.3%
mysql2 : 2,404.9 ops/s ± 1.3% ( -12.2% )
mariadb : 5,650.8 ops/s ± 1.4% ( +106.3% )
```
![select 100 int benchmark results](https://quickchart.io/chart/render/zm-ef74089a-be91-49f1-b5a0-5b9ac5752435?data1=2365&data2=1978&data3=3869)
![select 100 int benchmark results](https://quickchart.io/chart/render/zm-ef74089a-be91-49f1-b5a0-5b9ac5752435?data1=2739&data2=2405&data3=5651)

#### execute

## select 100 int - BINARY

```
select 100 int using execute
mysql2 : 2,042.3 ops/s ± 2.3%
mariadb : 8,101.4 ops/s ± 1.2% ( +296.7% )
select 100 int - BINARY
mysql2 : 2,473.4 ops/s ± 1.3%
mariadb : 10,533 ops/s ± 1.7% ( +325.9% )
```
![select 100 int - BINARY benchmark results](https://quickchart.io/chart/render/zm-36b213f4-8efe-4943-8f94-82edf94fce83?data1=2042&data2=8101)
![select 100 int - BINARY benchmark results](https://quickchart.io/chart/render/zm-36b213f4-8efe-4943-8f94-82edf94fce83?data1=2473&data2=10533)


## Quick Start
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchs/insert.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ function randomString(length) {
return result;
}

let sqlTable = 'CREATE TABLE perfTestText (id MEDIUMINT NOT NULL AUTO_INCREMENT,t0 text';
let sqlTable = 'CREATE TABLE perfTestText (id MEDIUMINT NOT NULL AUTO_INCREMENT,t0 varchar(100))';
let sqlParam = '';
let sqlCol = 't0';
for (let i = 1; i < 10; i++) {
sqlParam += ',?';
sqlCol += ',t' + i;
sqlTable += ',t' + i + ' text';
sqlTable += ',t' + i + ' varchar(100)';
}
sqlInsert = 'INSERT INTO perfTestText(' + sqlCol + ') VALUES (?' + sqlParam + ')';
sqlTable += ', PRIMARY KEY (id))';
Expand Down
5 changes: 2 additions & 3 deletions benchmarks/common-bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const conf = require('../test/conf');
const logUtility = require('./log-utility');
const config = Object.assign({}, conf.baseConfig, { charset: 'utf8mb4', trace: false });
console.log(config);
const minimumSamples = 200;
const minimumSamples = process.env.PERF_SAMPLES ? parseInt(process.env.PERF_SAMPLES) : 200;

//************************************************
// bench suite
Expand Down Expand Up @@ -57,7 +57,7 @@ const createBenchSuite = async (bench) => {
}

suite.on('cycle', function (event) {
console.log(chalk.grey(' ' + String(event.target)));
//console.log(chalk.grey(' ' + String(event.target)));
const type = event.target.name;
const iteration = 1 / event.target.times.period;
const variation = event.target.stats.rme;
Expand Down Expand Up @@ -104,7 +104,6 @@ const loadsources = async (requiresPool, requireExecute, mariadbOnly) => {
if (!mariadbOnly && mysql2) {
sources['mysql2'] = mysql2.createPool(Object.assign({ connectionLimit: 1 }, config));
}
sources['mariadb'] = mariadb.createPool(Object.assign({ connectionLimit: 1 }, config));
}

if (!mariadbOnly && mysql2) {
Expand Down
Loading

0 comments on commit f6861e5

Please sign in to comment.