@@ -118,18 +118,19 @@ Benchmark.prototype.http = function(options, cb) {
118
118
self . config . benchmarker ||
119
119
self . extra_options . benchmarker ||
120
120
exports . default_http_benchmarker ;
121
- http_benchmarkers . run ( http_options , function ( error , code , used_benchmarker ,
122
- result , elapsed ) {
123
- if ( cb ) {
124
- cb ( code ) ;
125
- }
126
- if ( error ) {
127
- console . error ( error ) ;
128
- process . exit ( code || 1 ) ;
121
+ http_benchmarkers . run (
122
+ http_options , ( error , code , used_benchmarker , result , elapsed ) => {
123
+ if ( cb ) {
124
+ cb ( code ) ;
125
+ }
126
+ if ( error ) {
127
+ console . error ( error ) ;
128
+ process . exit ( code || 1 ) ;
129
+ }
130
+ self . config . benchmarker = used_benchmarker ;
131
+ self . report ( result , elapsed ) ;
129
132
}
130
- self . config . benchmarker = used_benchmarker ;
131
- self . report ( result , elapsed ) ;
132
- } ) ;
133
+ ) ;
133
134
} ;
134
135
135
136
Benchmark . prototype . _run = function ( ) {
@@ -139,7 +140,7 @@ Benchmark.prototype._run = function() {
139
140
process . send ( {
140
141
type : 'config' ,
141
142
name : this . name ,
142
- queueLength : this . queue . length
143
+ queueLength : this . queue . length ,
143
144
} ) ;
144
145
}
145
146
@@ -162,10 +163,10 @@ Benchmark.prototype._run = function() {
162
163
163
164
const child = child_process . fork ( require . main . filename , childArgs , {
164
165
env : childEnv ,
165
- execArgv : self . flags . concat ( process . execArgv )
166
+ execArgv : self . flags . concat ( process . execArgv ) ,
166
167
} ) ;
167
168
child . on ( 'message' , sendResult ) ;
168
- child . on ( 'close' , function ( code ) {
169
+ child . on ( 'close' , ( code ) => {
169
170
if ( code ) {
170
171
process . exit ( code ) ;
171
172
return ;
@@ -241,7 +242,7 @@ Benchmark.prototype.report = function(rate, elapsed) {
241
242
conf : this . config ,
242
243
rate : rate ,
243
244
time : elapsed [ 0 ] + elapsed [ 1 ] / 1e9 ,
244
- type : 'report'
245
+ type : 'report' ,
245
246
} ) ;
246
247
} ;
247
248
@@ -267,7 +268,7 @@ const urls = {
267
268
ws : 'ws://localhost:9229/f46db715-70df-43ad-a359-7f9949f39868' ,
268
269
javascript : 'javascript:alert("node is awesome");' ,
269
270
percent : 'https://%E4%BD%A0/foo' ,
270
- dot : 'https://example.org/./a/../b/./c'
271
+ dot : 'https://example.org/./a/../b/./c' ,
271
272
} ;
272
273
exports . urls = urls ;
273
274
@@ -282,7 +283,7 @@ const searchParams = {
282
283
'foo=ghi&foo=jkl&foo=mno&foo=pqr&foo=stu&foo=vwxyz' ,
283
284
manypairs : 'a&b&c&d&e&f&g&h&i&j&k&l&m&n&o&p&q&r&s&t&u&v&w&x&y&z' ,
284
285
manyblankpairs : '&&&&&&&&&&&&&&&&&&&&&&&&' ,
285
- altspaces : 'foo+bar=baz+quux&xyzzy+thud=quuy+quuz&abc=def+ghi'
286
+ altspaces : 'foo+bar=baz+quux&xyzzy+thud=quuy+quuz&abc=def+ghi' ,
286
287
} ;
287
288
exports . searchParams = searchParams ;
288
289
0 commit comments