@@ -615,15 +615,16 @@ func updateCLI(
615615 // Header
616616 if measureRTT {
617617 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" ) {
619620 fmt .Fprint (w , "Active subscriptions\t " )
620621 } else {
621622 fmt .Fprint (w , "Active publishers\t " )
622623 }
623624 fmt .Fprint (w , "Avg RTT (ms)\t \n " )
624625 } else {
625626 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" ) {
627628 fmt .Fprint (w , "Active subscriptions\t \n " )
628629 } else {
629630 fmt .Fprint (w , "Active publishers\t \n " )
@@ -657,7 +658,7 @@ func updateCLI(
657658 // Metrics line
658659 fmt .Fprintf (w , "%.0f\t %d\t %.2f\t %.2f\t " , time .Since (start ).Seconds (), totalMessages , messageRate , connectRate )
659660
660- if strings .HasPrefix (mode , "subscribe" ) {
661+ if strings .Contains (mode , "subscribe" ) {
661662 fmt .Fprintf (w , "%d\t " , totalSubscribedChannels )
662663 } else {
663664 fmt .Fprintf (w , "%d\t " , atomic .LoadInt64 (& totalPublishers ))
0 commit comments