@@ -615,15 +615,16 @@ func updateCLI(
615
615
// Header
616
616
if measureRTT {
617
617
fmt .Fprint (w , "Test Time\t Total Messages\t Message Rate \t Connect Rate \t " )
618
- if strings .HasPrefix (mode , "subscribe" ) {
618
+
619
+ if strings .Contains (mode , "subscribe" ) {
619
620
fmt .Fprint (w , "Active subscriptions\t " )
620
621
} else {
621
622
fmt .Fprint (w , "Active publishers\t " )
622
623
}
623
624
fmt .Fprint (w , "Avg RTT (ms)\t \n " )
624
625
} else {
625
626
fmt .Fprint (w , "Test Time\t Total Messages\t Message Rate \t Connect Rate \t " )
626
- if strings .HasPrefix (mode , "subscribe" ) {
627
+ if strings .Contains (mode , "subscribe" ) {
627
628
fmt .Fprint (w , "Active subscriptions\t \n " )
628
629
} else {
629
630
fmt .Fprint (w , "Active publishers\t \n " )
@@ -657,7 +658,7 @@ func updateCLI(
657
658
// Metrics line
658
659
fmt .Fprintf (w , "%.0f\t %d\t %.2f\t %.2f\t " , time .Since (start ).Seconds (), totalMessages , messageRate , connectRate )
659
660
660
- if strings .HasPrefix (mode , "subscribe" ) {
661
+ if strings .Contains (mode , "subscribe" ) {
661
662
fmt .Fprintf (w , "%d\t " , totalSubscribedChannels )
662
663
} else {
663
664
fmt .Fprintf (w , "%d\t " , atomic .LoadInt64 (& totalPublishers ))
0 commit comments