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 <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
apapirovski authored and MylesBorins committed Feb 12, 2018
1 parent 791b6bb commit b71c29c
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 b71c29c

Please sign in to comment.