From 6df23fa39f0400a6d5e60cc5bbf9e4d18987bb9b Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Thu, 9 Mar 2017 22:01:45 +0100 Subject: [PATCH] benchmark: fix punycode and get-ciphers benchmark Add missing 'i=0' from for-loops from punycode and get-ciphers benchmarks. PR-URL: https://github.com/nodejs/node/pull/11720 Reviewed-By: Colin Ihrig Reviewed-By: Timothy Gu Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- benchmark/crypto/get-ciphers.js | 2 +- benchmark/misc/punycode.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark/crypto/get-ciphers.js b/benchmark/crypto/get-ciphers.js index f6b1767cb4f..3f5ad17ad38 100644 --- a/benchmark/crypto/get-ciphers.js +++ b/benchmark/crypto/get-ciphers.js @@ -18,6 +18,6 @@ function main(conf) { method(); } bench.start(); - for (; i < n; i++) method(); + for (i = 0; i < n; i++) method(); bench.end(n); } diff --git a/benchmark/misc/punycode.js b/benchmark/misc/punycode.js index b359fbbff4b..74ddadbb9da 100644 --- a/benchmark/misc/punycode.js +++ b/benchmark/misc/punycode.js @@ -46,7 +46,7 @@ function runPunycode(n, val) { for (; i < n; i++) usingPunycode(val); bench.start(); - for (; i < n; i++) + for (i = 0; i < n; i++) usingPunycode(val); bench.end(n); }