Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,12 @@ func main() {
if connectionReconnectInterval > 0 {
log.Printf("Using reconnection interval of %d milliseconds for subscriber: %s", connectionReconnectInterval, subscriberName)
}

log.Printf("subscriber: %s. Total channels %d: %v", subscriberName, len(channels), channels)

if *verbose {
log.Printf("subscriber: %s. Total channels %d: %v", subscriberName, len(channels), channels)
}
if totalCreatedClients%100 == 0 {
log.Printf("Created %d clients so far.", totalCreatedClients)
}
wg.Add(1)
go subscriberRoutine(subscriberName, *mode, channels, *printMessages, connectionReconnectInterval, *measureRTT, rttLatencyChannel, ctx, &wg, client)
}
Expand Down Expand Up @@ -536,10 +539,12 @@ func main() {
}
avg := hist.Mean()
p50 := hist.ValueAtQuantile(50.0)
p95 := hist.ValueAtQuantile(95.0)
p99 := hist.ValueAtQuantile(99.0)
p999 := hist.ValueAtQuantile(99.9)
fmt.Fprintf(w, "Avg RTT %.3f ms\n", avg/1000.0)
fmt.Fprintf(w, "P50 RTT %.3f ms\n", float64(p50)/1000.0)
fmt.Fprintf(w, "P95 RTT %.3f ms\n", float64(p95)/1000.0)
fmt.Fprintf(w, "P99 RTT %.3f ms\n", float64(p99)/1000.0)
fmt.Fprintf(w, "P999 RTT %.3f ms\n", float64(p999)/1000.0)
} else {
Expand Down