Skip to content

Commit

Permalink
benchmark: change the execution order
Browse files Browse the repository at this point in the history
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: #8659
PR-URL: #9064
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
  • Loading branch information
AndreasMadsen authored and jasnell committed Oct 17, 2016
1 parent a5046bf commit 8b152fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmark/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
Expand Down

0 comments on commit 8b152fc

Please sign in to comment.