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
7 changes: 4 additions & 3 deletions subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,15 +615,16 @@ func updateCLI(
// Header
if measureRTT {
fmt.Fprint(w, "Test Time\tTotal Messages\t Message Rate \tConnect Rate \t")
if strings.HasPrefix(mode, "subscribe") {

if strings.Contains(mode, "subscribe") {
fmt.Fprint(w, "Active subscriptions\t")
} else {
fmt.Fprint(w, "Active publishers\t")
}
fmt.Fprint(w, "Avg RTT (ms)\t\n")
} else {
fmt.Fprint(w, "Test Time\tTotal Messages\t Message Rate \tConnect Rate \t")
if strings.HasPrefix(mode, "subscribe") {
if strings.Contains(mode, "subscribe") {
fmt.Fprint(w, "Active subscriptions\t\n")
} else {
fmt.Fprint(w, "Active publishers\t\n")
Expand Down Expand Up @@ -657,7 +658,7 @@ func updateCLI(
// Metrics line
fmt.Fprintf(w, "%.0f\t%d\t%.2f\t%.2f\t", time.Since(start).Seconds(), totalMessages, messageRate, connectRate)

if strings.HasPrefix(mode, "subscribe") {
if strings.Contains(mode, "subscribe") {
fmt.Fprintf(w, "%d\t", totalSubscribedChannels)
} else {
fmt.Fprintf(w, "%d\t", atomic.LoadInt64(&totalPublishers))
Expand Down