File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,23 +10,23 @@ const PORT = common.PORT;
1010// event loop cycles more than anything else.
1111const bench = common . createBenchmark ( main , {
1212 len : [ 1 , 64 , 256 , 1024 ] ,
13- num : [ 100 ] ,
13+ n : [ 100 ] ,
1414 type : [ 'send' , 'recv' ] ,
1515 dur : [ 5 ] ,
1616} ) ;
1717
18- function main ( { dur, len, num, type } ) {
18+ function main ( { dur, len, num : n , type } ) {
1919 const chunk = Buffer . allocUnsafe ( len ) ;
2020 let sent = 0 ;
2121 let received = 0 ;
2222 const socket = dgram . createSocket ( 'udp4' ) ;
2323
2424 function onsend ( ) {
25- if ( sent ++ % num === 0 ) {
25+ if ( sent ++ % n === 0 ) {
2626 // The setImmediate() is necessary to have event loop progress on OSes
2727 // that only perform synchronous I/O on nonblocking UDP sockets.
2828 setImmediate ( ( ) => {
29- for ( let i = 0 ; i < num ; i ++ ) {
29+ for ( let i = 0 ; i < n ; i ++ ) {
3030 socket . send ( chunk , PORT , '127.0.0.1' , onsend ) ;
3131 }
3232 } ) ;
You can’t perform that action at this time.
0 commit comments