summaryrefslogtreecommitdiff
path: root/benchmark/buffers/buffer-read-with-byteLength.js
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/buffers/buffer-read-with-byteLength.js')
-rw-r--r--benchmark/buffers/buffer-read-with-byteLength.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/benchmark/buffers/buffer-read-with-byteLength.js b/benchmark/buffers/buffer-read-with-byteLength.js
index 1858c4fd96..93deab2ab0 100644
--- a/benchmark/buffers/buffer-read-with-byteLength.js
+++ b/benchmark/buffers/buffer-read-with-byteLength.js
@@ -11,19 +11,19 @@ const types = [
const bench = common.createBenchmark(main, {
buffer: ['fast', 'slow'],
type: types,
- millions: [1],
+ n: [1e6],
byteLength: [1, 2, 3, 4, 5, 6]
});
-function main({ millions, buf, type, byteLength }) {
+function main({ n, buf, type, byteLength }) {
const clazz = buf === 'fast' ? Buffer : require('buffer').SlowBuffer;
const buff = new clazz(8);
const fn = `read${type || 'IntBE'}`;
buff.writeDoubleLE(0, 0);
bench.start();
- for (var i = 0; i !== millions * 1e6; i++) {
+ for (var i = 0; i !== n; i++) {
buff[fn](0, byteLength);
}
- bench.end(millions);
+ bench.end(n);
}