summaryrefslogtreecommitdiff
path: root/benchmark/misc
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-11-24 11:43:35 -0800
committerRich Trott <rtrott@gmail.com>2016-11-27 21:51:09 -0800
commit566a1513d1a21674a35153f28db051c372047f24 (patch)
treedab80b0647fe5dbc676defac3b4ca82fd366caee /benchmark/misc
parent31d1a3f8a89e709ccd7aa07d900464c234d9727f (diff)
downloadandroid-node-v8-566a1513d1a21674a35153f28db051c372047f24.tar.gz
android-node-v8-566a1513d1a21674a35153f28db051c372047f24.tar.bz2
android-node-v8-566a1513d1a21674a35153f28db051c372047f24.zip
benchmark: reformat code for clarity
Some of the benchmark code can be a little dense. Not *very* hard to read but perhaps harder than it needs to be. These changes (many of them whitespace-only) hopefully improve readability. There are also a few cases of `assert.equal()` that are changed to `assert.strictEqual()`. PR-URL: https://github.com/nodejs/node/pull/9790 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'benchmark/misc')
-rw-r--r--benchmark/misc/console.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/benchmark/misc/console.js b/benchmark/misc/console.js
index 17f7ed0f4d..9a08a411c5 100644
--- a/benchmark/misc/console.js
+++ b/benchmark/misc/console.js
@@ -8,11 +8,15 @@ const v8 = require('v8');
v8.setFlagsFromString('--allow_natives_syntax');
+const methods = [
+ 'restAndSpread',
+ 'argumentsAndApply',
+ 'restAndApply',
+ 'restAndConcat'
+];
+
var bench = common.createBenchmark(main, {
- method: ['restAndSpread',
- 'argumentsAndApply',
- 'restAndApply',
- 'restAndConcat'],
+ method: methods,
concat: [1, 0],
n: [1000000]
});