From 41173de77b04ec9b659dc59d6b448556147a410e Mon Sep 17 00:00:00 2001 From: Andreas Madsen Date: Wed, 12 Oct 2016 20:28:57 +0200 Subject: [PATCH] benchmark: change the execution order This changes the execution order from "iter, file, binary" to "file, iter, binary". This means the csv no longer has to buffered completely. This also has the added effect that stopping compare.js early or interfering with performance only affects a single benchmark, instead of all of them. Refs: https://github.com/nodejs/node/issues/8659 PR-URL: https://github.com/nodejs/node/pull/9064 Reviewed-By: James M Snell Reviewed-By: Brian White --- benchmark/compare.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark/compare.js b/benchmark/compare.js index de328d60fc..ea431b18cb 100644 --- a/benchmark/compare.js +++ b/benchmark/compare.js @@ -40,8 +40,8 @@ if (benchmarks.length === 0) { // Create queue from the benchmarks list such both node versions are tested // `runs` amount of times each. const queue = []; -for (let iter = 0; iter < runs; iter++) { - for (const filename of benchmarks) { +for (const filename of benchmarks) { + for (let iter = 0; iter < runs; iter++) { for (const binary of binaries) { queue.push({ binary, filename, iter }); }