svn commit: r361115 - head/tools/tools/ath/athratestats

Adrian Chadd adrian at FreeBSD.org
Sat May 16 18:49:38 UTC 2020


Author: adrian
Date: Sat May 16 18:49:37 2020
New Revision: 361115
URL: https://svnweb.freebsd.org/changeset/base/361115

Log:
  [ath] Flip athratestats to use two columns for now.
  
  Yeah I have too many rates on the screen now...

Modified:
  head/tools/tools/ath/athratestats/main.c

Modified: head/tools/tools/ath/athratestats/main.c
==============================================================================
--- head/tools/tools/ath/athratestats/main.c	Sat May 16 18:37:48 2020	(r361114)
+++ head/tools/tools/ath/athratestats/main.c	Sat May 16 18:49:37 2020	(r361115)
@@ -147,8 +147,11 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_r
 		PRINTATTR_OFF(COLOR_PAIR(3) | A_BOLD);
 	}
 	PRINTMSG("   TX Rate      TXTOTAL:TXOK       EWMA          T/   F"
+	    "     avg last xmit  ");
+	PRINTMSG("   TX Rate      TXTOTAL:TXOK       EWMA          T/   F"
 	    "     avg last xmit\n");
 	for (mask = sn->ratemask, rix = 0; mask != 0; mask >>= 1, rix++) {
+		int c = 0;
 		if ((mask & 1) == 0)
 				continue;
 		for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) {
@@ -165,7 +168,7 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_r
 				PRINTATTR_ON(COLOR_PAIR(1) | A_BOLD);
 #endif
 			PRINTMSG("[%2u %s:%5u] %8ju:%-8ju "
-			    "(%3d.%1d%%) %8ju/%4d %5uuS %u\n",
+			    "(%3d.%1d%%) %8ju/%4d %5uuS %u ",
 			    dot11rate(rt, rix),
 			    dot11str(rt, rix),
 			    bin_to_size(y),
@@ -187,7 +190,14 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_r
 			else if (sn->stats[y][rix].ewma_pct / 10 < 75)
 				PRINTATTR_OFF(COLOR_PAIR(1) | A_BOLD);
 #endif
+			c++;
+			if (c == 2) {
+				PRINTMSG("\n");
+				c = 0;
+			}
 		}
+		if (c != 0)
+			PRINTMSG("\n");
 	}
 }
 


More information about the svn-src-head mailing list