From owner-svn-src-head@freebsd.org Wed May 13 16:36:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EBA32FA783; Wed, 13 May 2020 16:36:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49MgL26cHxz4G09; Wed, 13 May 2020 16:36:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D979E244E3; Wed, 13 May 2020 16:36:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04DGag1T043344; Wed, 13 May 2020 16:36:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04DGag7V043343; Wed, 13 May 2020 16:36:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202005131636.04DGag7V043343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 13 May 2020 16:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361009 - head/tools/tools/ath/athratestats X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/tools/tools/ath/athratestats X-SVN-Commit-Revision: 361009 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 16:36:43 -0000 Author: adrian Date: Wed May 13 16:36:42 2020 New Revision: 361009 URL: https://svnweb.freebsd.org/changeset/base/361009 Log: [ath] Prepare for .. more sample rate control entries This is in preparation for me bumping how many size buckets are used for ath_rate_sample statistics. * Bump buffer size to 64k * Don't waste 4 lines per bucket size, condense it to two * Alternate colours; my logic made everything after the first two just be black. Oops. Modified: head/tools/tools/ath/athratestats/main.c Modified: head/tools/tools/ath/athratestats/main.c ============================================================================== --- head/tools/tools/ath/athratestats/main.c Wed May 13 12:33:51 2020 (r361008) +++ head/tools/tools/ath/athratestats/main.c Wed May 13 16:36:42 2020 (r361009) @@ -64,7 +64,7 @@ static int do_loop = 0; * This needs to be big enough to fit the two TLVs, the rate table * and the rate statistics table for a single node. */ -#define STATS_BUF_SIZE 8192 +#define STATS_BUF_SIZE 65536 #define PRINTMSG(...) do { \ if (do_loop == 0) \ @@ -122,24 +122,23 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_r (long long) sn->ratemask); for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) { - PRINTATTR_ON(COLOR_PAIR(y+4) | A_BOLD); + PRINTATTR_ON(COLOR_PAIR(4 + (y % 2)) | A_BOLD); PRINTMSG("[%4u] cur rate %d %s since switch: " - "packets %d ticks %u\n", + "packets %d ticks %u ", bin_to_size(y), dot11rate(rt, sn->current_rix[y]), dot11str(rt, sn->current_rix[y]), sn->packets_since_switch[y], sn->ticks_since_switch[y]); - PRINTMSG("[%4u] last sample (%d %s) cur sample (%d %s) " + PRINTMSG("last sample (%d %s) cur sample (%d %s) " "packets sent %d\n", - bin_to_size(y), dot11rate(rt, sn->last_sample_rix[y]), dot11str(rt, sn->last_sample_rix[y]), dot11rate(rt, sn->current_sample_rix[y]), dot11str(rt, sn->current_sample_rix[y]), sn->packets_sent[y]); - PRINTATTR_OFF(COLOR_PAIR(y+4) | A_BOLD); + PRINTATTR_OFF(COLOR_PAIR(4 + (y % 2)) | A_BOLD); PRINTATTR_ON(COLOR_PAIR(3) | A_BOLD); PRINTMSG("[%4u] packets since sample %d sample tt %u\n", @@ -147,7 +146,6 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_r sn->packets_since_sample[y], sn->sample_tt[y]); PRINTATTR_OFF(COLOR_PAIR(3) | A_BOLD); - PRINTMSG("\n"); } PRINTMSG(" TX Rate TXTOTAL:TXOK EWMA T/ F" " avg last xmit\n");