@@ -19,12 +19,12 @@ const bench = common.createBenchmark(main, {
19
19
] ,
20
20
prefixPath : [ '/tmp' ] ,
21
21
nFiles : [ 10 , 100 , 1000 ] ,
22
- count : [ 30 ] ,
22
+ n : [ 30 ] ,
23
23
} ) ;
24
24
25
25
function spawnProcess ( script , bench , state ) {
26
26
const cmd = process . execPath || process . argv [ 0 ] ;
27
- while ( state . finished < state . count ) {
27
+ while ( state . finished < state . n ) {
28
28
const child = spawnSync ( cmd , script ) ;
29
29
if ( child . status !== 0 ) {
30
30
console . log ( '---- STDOUT ----' ) ;
@@ -39,13 +39,13 @@ function spawnProcess(script, bench, state) {
39
39
bench . start ( ) ;
40
40
}
41
41
42
- if ( state . finished === state . count ) {
43
- bench . end ( state . count ) ;
42
+ if ( state . finished === state . n ) {
43
+ bench . end ( state . n ) ;
44
44
}
45
45
}
46
46
}
47
47
48
- function main ( { count , script, nFiles, prefixPath } ) {
48
+ function main ( { n , script, nFiles, prefixPath } ) {
49
49
script = path . resolve ( __dirname , '../../' , `${ script } .js` ) ;
50
50
const optionsWithScript = [
51
51
'--permission' ,
@@ -54,6 +54,6 @@ function main({ count, script, nFiles, prefixPath }) {
54
54
script ,
55
55
] ;
56
56
const warmup = 3 ;
57
- const state = { count , finished : - warmup } ;
57
+ const state = { n , finished : - warmup } ;
58
58
spawnProcess ( optionsWithScript , bench , state ) ;
59
59
}
0 commit comments