Skip to content

Commit 8d6d1f5

Browse files
Reduced logging level at start of benchmark and extended summary metrics (p95) (#26)
* Add optional rate limiting to publisher with --rps and --rps-burst flags * Updated go version on ci to 1.23 and 1.24 * Reduced logging level at start of benchmark * Included p95 metric --------- Co-authored-by: fcostaoliveira <[email protected]>
1 parent bde98f8 commit 8d6d1f5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

subscriber.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,12 @@ func main() {
502502
if connectionReconnectInterval > 0 {
503503
log.Printf("Using reconnection interval of %d milliseconds for subscriber: %s", connectionReconnectInterval, subscriberName)
504504
}
505-
506-
log.Printf("subscriber: %s. Total channels %d: %v", subscriberName, len(channels), channels)
507-
505+
if *verbose {
506+
log.Printf("subscriber: %s. Total channels %d: %v", subscriberName, len(channels), channels)
507+
}
508+
if totalCreatedClients%100 == 0 {
509+
log.Printf("Created %d clients so far.", totalCreatedClients)
510+
}
508511
wg.Add(1)
509512
go subscriberRoutine(subscriberName, *mode, channels, *printMessages, connectionReconnectInterval, *measureRTT, rttLatencyChannel, ctx, &wg, client)
510513
}
@@ -536,10 +539,12 @@ func main() {
536539
}
537540
avg := hist.Mean()
538541
p50 := hist.ValueAtQuantile(50.0)
542+
p95 := hist.ValueAtQuantile(95.0)
539543
p99 := hist.ValueAtQuantile(99.0)
540544
p999 := hist.ValueAtQuantile(99.9)
541545
fmt.Fprintf(w, "Avg RTT %.3f ms\n", avg/1000.0)
542546
fmt.Fprintf(w, "P50 RTT %.3f ms\n", float64(p50)/1000.0)
547+
fmt.Fprintf(w, "P95 RTT %.3f ms\n", float64(p95)/1000.0)
543548
fmt.Fprintf(w, "P99 RTT %.3f ms\n", float64(p99)/1000.0)
544549
fmt.Fprintf(w, "P999 RTT %.3f ms\n", float64(p999)/1000.0)
545550
} else {

0 commit comments

Comments
 (0)