Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Madsen <amwebdk@gmail.com>2016-10-12 21:28:57 +0300
committerJames M Snell <jasnell@gmail.com>2016-10-17 19:45:37 +0300
commit8b152fcf47ece505268637ec224beebba0581e8f (patch)
treeb0d7b0b832f23d214fe9ef55f49dd6df1f94ffe6 /benchmark
parenta5046bf8efd6c1f1280e74974f9bb9e1f7081171 (diff)
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 <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/compare.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmark/compare.js b/benchmark/compare.js
index de328d60fcb..ea431b18cb4 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 });
}