From 848997f331a76f2445746e4ca5f5e6e71a469e01 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 19 Aug 2017 17:10:31 -0700 Subject: [PATCH 1/5] test: add test-benchmark-domain Add minimal test to confirm that domain benchmarks run. --- test/parallel/test-benchmark-domain.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/parallel/test-benchmark-domain.js diff --git a/test/parallel/test-benchmark-domain.js b/test/parallel/test-benchmark-domain.js new file mode 100644 index 00000000000000..cacd45f6dad8c7 --- /dev/null +++ b/test/parallel/test-benchmark-domain.js @@ -0,0 +1,21 @@ +'use strict'; + +require('../common'); + +// Minimal test for domain benchmarks. This makes sure the benchmarks aren't +// horribly broken but nothing more than that. + +const assert = require('assert'); +const fork = require('child_process').fork; +const path = require('path'); + +const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js'); +const argv = ['--set', 'arguments=0', + '--set', 'n=1', + 'domain']; + +const child = fork(runjs, argv); +child.on('exit', (code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +}); From c83090a2efcd39ab59454b4edb6e226f3d0694e6 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 19 Aug 2017 17:25:26 -0700 Subject: [PATCH 2/5] test: add test-benchmark-events Add minimal test to confirm that events benchmarks run. --- test/parallel/test-benchmark-events.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/parallel/test-benchmark-events.js diff --git a/test/parallel/test-benchmark-events.js b/test/parallel/test-benchmark-events.js new file mode 100644 index 00000000000000..6b7d25c61f007f --- /dev/null +++ b/test/parallel/test-benchmark-events.js @@ -0,0 +1,20 @@ +'use strict'; + +require('../common'); + +// Minimal test for events benchmarks. This makes sure the benchmarks aren't +// horribly broken but nothing more than that. + +const assert = require('assert'); +const fork = require('child_process').fork; +const path = require('path'); + +const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js'); +const argv = ['--set', 'n=1', + 'events']; + +const child = fork(runjs, argv); +child.on('exit', (code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +}); From 38ee69a1991e3548e2e1372f55ecdfca20ed04ce Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 19 Aug 2017 18:17:04 -0700 Subject: [PATCH 3/5] test: add test-benchmark-os Add minimal test to confirm that os benchmarks run. --- test/parallel/test-benchmark-os.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/parallel/test-benchmark-os.js diff --git a/test/parallel/test-benchmark-os.js b/test/parallel/test-benchmark-os.js new file mode 100644 index 00000000000000..4ad179063afce8 --- /dev/null +++ b/test/parallel/test-benchmark-os.js @@ -0,0 +1,20 @@ +'use strict'; + +require('../common'); + +// Minimal test for os benchmarks. This makes sure the benchmarks aren't +// horribly broken but nothing more than that. + +const assert = require('assert'); +const fork = require('child_process').fork; +const path = require('path'); + +const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js'); +const argv = ['--set', 'n=1', + 'os']; + +const child = fork(runjs, argv); +child.on('exit', (code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +}); From c5318fea8e64aedf26d8023c82b7091938341917 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 19 Aug 2017 21:25:45 -0700 Subject: [PATCH 4/5] test: add test-benchmark-path Add minimal test to confirm that path benchmarks run. --- test/parallel/test-benchmark-path.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/parallel/test-benchmark-path.js diff --git a/test/parallel/test-benchmark-path.js b/test/parallel/test-benchmark-path.js new file mode 100644 index 00000000000000..922a59f03cde8d --- /dev/null +++ b/test/parallel/test-benchmark-path.js @@ -0,0 +1,24 @@ +'use strict'; + +require('../common'); + +// Minimal test for path benchmarks. This makes sure the benchmarks aren't +// horribly broken but nothing more than that. + +const assert = require('assert'); +const fork = require('child_process').fork; +const path = require('path'); + +const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js'); +const argv = ['--set', 'n=1', + '--set', 'path=', + '--set', 'pathext=', + '--set', 'paths=', + '--set', 'props=', + 'path']; + +const child = fork(runjs, argv); +child.on('exit', (code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +}); From 3899126c062bde36078e4460ac2635c2da78576f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 19 Aug 2017 21:29:22 -0700 Subject: [PATCH 5/5] test: add test-benchmark-process Add minimal test to confirm that process benchmarks run. --- test/parallel/test-benchmark-process.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/parallel/test-benchmark-process.js diff --git a/test/parallel/test-benchmark-process.js b/test/parallel/test-benchmark-process.js new file mode 100644 index 00000000000000..6abd584379d146 --- /dev/null +++ b/test/parallel/test-benchmark-process.js @@ -0,0 +1,22 @@ +'use strict'; + +require('../common'); + +// Minimal test for process benchmarks. This makes sure the benchmarks aren't +// horribly broken but nothing more than that. + +const assert = require('assert'); +const fork = require('child_process').fork; +const path = require('path'); + +const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js'); +const argv = ['--set', 'millions=0.000001', + '--set', 'n=1', + '--set', 'type=raw', + 'process']; + +const child = fork(runjs, argv); +child.on('exit', (code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +});