We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ade64e6 commit 7aeeee3Copy full SHA for 7aeeee3
benchmark/fs/readfile.js
@@ -22,8 +22,10 @@ function main(conf) {
22
data = null;
23
24
var reads = 0;
25
+ var bench_ended = false;
26
bench.start();
27
setTimeout(function() {
28
+ bench_ended = true;
29
bench.end(reads);
30
try { fs.unlinkSync(filename); } catch (e) {}
31
process.exit(0);
@@ -41,7 +43,8 @@ function main(conf) {
41
43
throw new Error('wrong number of bytes returned');
42
44
45
reads++;
- read();
46
+ if (!bench_ended)
47
+ read();
48
}
49
50
var cur = +conf.concurrent;
0 commit comments