@@ -68,9 +68,9 @@ function updateCLI(
6868 if ( measureRTT ) {
6969 const tickRttValues = rttValues . splice ( 0 ) ;
7070 if ( tickRttValues . length > 0 ) {
71- const sum = tickRttValues . reduce ( ( a , b ) => a + b , 0n ) ;
71+ const sum = tickRttValues . reduce ( ( a , b ) => a + b , 0 ) ;
7272 const avgRtt = Number ( sum ) / tickRttValues . length ;
73- avgRttMs = avgRtt / 1000 ;
73+ avgRttMs = avgRtt ;
7474 metrics . push ( avgRttMs . toFixed ( 3 ) ) ;
7575 } else {
7676 metrics . push ( '--' ) ;
@@ -122,7 +122,7 @@ function writeFinalResults(
122122 rttArchive ,
123123 perSecondStats
124124) {
125- const duration = ( end - start ) / 1000 ;
125+ const duration = ( end - start ) ;
126126 const messageRate = totalMessages / duration ;
127127
128128 console . log ( '#################################################' ) ;
@@ -131,7 +131,7 @@ function writeFinalResults(
131131 console . log ( `Message Rate: ${ messageRate . toFixed ( 6 ) } msg/sec` ) ;
132132
133133 const result = {
134- StartTime : Math . floor ( start / 1000 ) ,
134+ StartTime : Math . floor ( start ) ,
135135 Duration : duration ,
136136 Mode : mode ,
137137 MessageRate : messageRate ,
@@ -159,11 +159,11 @@ function writeFinalResults(
159159 if ( val >= 0 ) histogram . recordValue ( val ) ;
160160 } ) ;
161161
162- const avgRtt = histogram . mean / 1000 ;
163- const p50 = histogram . getValueAtPercentile ( 50 ) / 1000 ;
164- const p95 = histogram . getValueAtPercentile ( 95 ) / 1000 ;
165- const p99 = histogram . getValueAtPercentile ( 99 ) / 1000 ;
166- const p999 = histogram . getValueAtPercentile ( 99.9 ) / 1000 ;
162+ const avgRtt = histogram . mean ;
163+ const p50 = histogram . getValueAtPercentile ( 50 ) ;
164+ const p95 = histogram . getValueAtPercentile ( 95 ) ;
165+ const p99 = histogram . getValueAtPercentile ( 99 ) ;
166+ const p999 = histogram . getValueAtPercentile ( 99.9 ) ;
167167
168168 result . RTTSummary = {
169169 AvgMs : Number ( avgRtt . toFixed ( 3 ) ) ,
0 commit comments