Skip to content

Commit

Permalink
benchmark: fix timeout in write-stream-throughput
Browse files Browse the repository at this point in the history
PR-URL: #17958
Fixes: #17901
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
apapirovski authored and MylesBorins committed Jan 24, 2018
1 parent e734e0a commit 452d2c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions benchmark/fs/write-stream-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ function main(conf) {
var started = false;
var ending = false;
var ended = false;
setTimeout(function() {
ending = true;
f.end();
}, dur * 1000);

var f = fs.createWriteStream(filename);
f.on('drain', write);
Expand All @@ -66,6 +62,10 @@ function main(conf) {

if (!started) {
started = true;
setTimeout(function() {
ending = true;
f.end();
}, dur * 1000);
bench.start();
}

Expand Down

0 comments on commit 452d2c5

Please sign in to comment.