summaryrefslogtreecommitdiff
path: root/benchmark/buffers/buffer-read.js
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/buffers/buffer-read.js
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/buffers/buffer-read.js')
-rw-r--r--benchmark/buffers/buffer-read.js24
1 files changed, 18 insertions, 6 deletions
diff --git a/benchmark/buffers/buffer-read.js b/benchmark/buffers/buffer-read.js
index 1cdc4bc469..d23bd029f8 100644
--- a/benchmark/buffers/buffer-read.js
+++ b/benchmark/buffers/buffer-read.js
@@ -1,15 +1,27 @@
'use strict';
var common = require('../common.js');
+var types = [
+ 'UInt8',
+ 'UInt16LE',
+ 'UInt16BE',
+ 'UInt32LE',
+ 'UInt32BE',
+ 'Int8',
+ 'Int16LE',
+ 'Int16BE',
+ 'Int32LE',
+ 'Int32BE',
+ 'FloatLE',
+ 'FloatBE',
+ 'DoubleLE',
+ 'DoubleBE'
+];
+
var bench = common.createBenchmark(main, {
noAssert: ['false', 'true'],
buffer: ['fast', 'slow'],
- type: ['UInt8', 'UInt16LE', 'UInt16BE',
- 'UInt32LE', 'UInt32BE',
- 'Int8', 'Int16LE', 'Int16BE',
- 'Int32LE', 'Int32BE',
- 'FloatLE', 'FloatBE',
- 'DoubleLE', 'DoubleBE'],
+ type: types,
millions: [1]
});