benchmark appveyor/travis using mariasql (informational only)

This commit is contained in:
rusher
2018-03-16 17:59:25 +01:00
parent 222fcf2d25
commit 74e4faafd5
4 changed files with 17 additions and 9 deletions

View File

@ -75,5 +75,5 @@ script:
- if [ -n "$LINT" ] ; then yarn run test:lint; fi
- if [ -z "$BENCH$LINT" ] ; then yarn run test:base; fi
# to permit benchmark with mariasql
- if [ -n "$BENCH" ] ; then npm install mariasql; fi
- if [ -n "$BENCH" ] ; then npm install microtime mariasql; fi
- if [ -n "$BENCH" ] ; then yarn run benchmark; fi

View File

@ -6,13 +6,13 @@ const Conf = require('../test/conf');
const connOptions = new ConnOptions(Conf.baseConfig);
let decrement = 20;
var callback = () => console.log("connected to docker server");
var callback = () => console.log("docker db server up");
const checkConnection = function() {
decrement-=1;
let conn = new Connection(connOptions);
conn.on('error', (err) => {
console.error("Error connecting docker server (connection:" + decrement + ")");
console.error("Error connecting docker server (connection try " + (20 - decrement) + " of 20)");
if (decrement === 0) {
throw err;
} else {

View File

@ -6,17 +6,24 @@ environment:
CMAKE_PARAM: 'Visual Studio 15 2017 Win64'
MUST_USE_TCPIP: 1
matrix:
- DB: '10.2.12'
- DB: '10.2.13'
nodejs_version: "6"
- DB: '10.2.12'
- DB: '10.2.13'
nodejs_version: "8"
- DB: '10.2.12'
- DB: '10.2.13'
nodejs_version: "9"
MYSQL_USE_COMPRESSION: 1
- DB: '10.2.12'
- DB: '10.2.13'
nodejs_version: "9"
- DB: '10.2.13'
nodejs_version: "9"
BENCH: "1"
- DB: '10.2.13'
nodejs_version: "8"
- DB: '10.3.4'
@ -50,4 +57,5 @@ test_script:
- node --version
- yarn --version
- cd c:\projects\mariadb-connector-nodejs
- npm test
- if "%BENCH%" == "1" ( npm install microtime mariasql ) else ( npm test )
- if "%BENCH%" == "1" ( yarn run benchmark )

View File

@ -5,7 +5,7 @@ if (process.env.TEST_HOST) baseConfig["host"] = process.env.TEST_HOST;
if (process.env.TEST_USER) baseConfig["user"] = process.env.TEST_USER;
if (process.env.TEST_PASSWORD) baseConfig["password"] = process.env.TEST_PASSWORD;
if (process.env.TEST_DB) baseConfig["database"] = process.env.TEST_DB;
if (process.env.TEST_PORT) baseConfig["port"] = process.env.TEST_PORT;
if (process.env.TEST_PORT) baseConfig["port"] = parseInt(process.env.TEST_PORT, 10);
global.longTest = process.env.TEST_LONG ? process.env.TEST_LONG : false;
module.exports.baseConfig = baseConfig;