All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [BlueZ PATCH v2 4/5] monitor: Make --analyze output latencies in msec
Date: Mon,  9 Aug 2021 15:49:41 -0700	[thread overview]
Message-ID: <20210809224942.225915-4-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20210809224942.225915-1-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Milisecconds is probably the best unit to have since it is unlikely that
the controller can respond in under 1 msec as well as most time
sensitive connection e.g. A2DP, HFP, etc, also don't expect the
latencies to be over 1 sec.
---
 monitor/analyze.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/monitor/analyze.c b/monitor/analyze.c
index aae153f94..bee05f467 100644
--- a/monitor/analyze.c
+++ b/monitor/analyze.c
@@ -110,12 +110,15 @@ static void conn_destroy(void *data)
 	printf("    %lu RX packets\n", conn->rx_num);
 	printf("    %lu TX packets\n", conn->tx_num);
 	printf("    %lu TX completed packets\n", conn->tx_num_comp);
-	printf("    %ld.%06ld seconds min latency\n",
-			conn->tx_lat_min.tv_sec, conn->tx_lat_min.tv_usec);
-	printf("    %ld.%06ld seconds max latency\n",
-			conn->tx_lat_max.tv_sec, conn->tx_lat_max.tv_usec);
-	printf("    %ld.%06ld seconds median latency\n",
-			conn->tx_lat_med.tv_sec, conn->tx_lat_med.tv_usec);
+	printf("    %ld msec min latency\n",
+			conn->tx_lat_min.tv_sec * 1000 +
+			conn->tx_lat_min.tv_usec / 1000);
+	printf("    %ld msec max latency\n",
+			conn->tx_lat_max.tv_sec * 1000 +
+			conn->tx_lat_max.tv_usec / 1000);
+	printf("    %ld msec median latency\n",
+			conn->tx_lat_med.tv_sec * 1000 +
+			conn->tx_lat_med.tv_usec / 1000);
 	printf("    %u octets TX min packet size\n", conn->tx_pkt_min);
 	printf("    %u octets TX max packet size\n", conn->tx_pkt_max);
 	printf("    %u octets TX median packet size\n", conn->tx_pkt_med);
-- 
2.31.1


  parent reply	other threads:[~2021-08-09 22:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 22:49 [BlueZ PATCH v2 1/5] monitor: Fix median packet size Luiz Augusto von Dentz
2021-08-09 22:49 ` [BlueZ PATCH v2 2/5] monitor: Fix minimun packet latency Luiz Augusto von Dentz
2021-08-09 22:49 ` [BlueZ PATCH v2 3/5] monitor: Fix not accouting for multiple outstanding packets Luiz Augusto von Dentz
2021-08-09 22:49 ` Luiz Augusto von Dentz [this message]
2021-08-09 22:49 ` [BlueZ PATCH v2 5/5] monitor: Make --analyze print address OUI Luiz Augusto von Dentz
2021-08-09 23:38 ` [BlueZ,v2,1/5] monitor: Fix median packet size bluez.test.bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210809224942.225915-4-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.