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 Feb 13, 2018
1 parent 15d0ed5 commit 6f33953
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 @@ -40,10 +40,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 @@ -65,6 +61,10 @@ function main(conf) {

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

Expand Down

0 comments on commit 6f33953

Please sign in to comment.