We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15d0ed5 commit 6f33953Copy full SHA for 6f33953
benchmark/fs/write-stream-throughput.js
@@ -40,10 +40,6 @@ function main(conf) {
40
var started = false;
41
var ending = false;
42
var ended = false;
43
- setTimeout(function() {
44
- ending = true;
45
- f.end();
46
- }, dur * 1000);
47
48
var f = fs.createWriteStream(filename);
49
f.on('drain', write);
@@ -65,6 +61,10 @@ function main(conf) {
65
61
66
62
if (!started) {
67
63
started = true;
64
+ setTimeout(function() {
+ ending = true;
+ f.end();
+ }, dur * 1000);
68
bench.start();
69
}
70
0 commit comments