]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Dump TX in flight bytes vs window values ratio.
authorFrederic Lecaille <flecaille@haproxy.com>
Fri, 26 Jul 2024 14:30:57 +0000 (16:30 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 26 Jul 2024 14:42:44 +0000 (16:42 +0200)
Display the ratio of the numbers of bytes in flight by packet number spaces
versus the current window values in percent.

src/quic_cli.c

index d5eda2e6a04a6dac9a4e73c3a7ec1163bd4e26ba..3a1923e6c42f5fcbd4d06d9d42e386cd4a1e0874 100644 (file)
@@ -282,20 +282,23 @@ static void dump_quic_full(struct show_quic_ctx *ctx, struct quic_conn *qc)
        if (ctx->fields & QUIC_DUMP_FLD_PKTNS) {
                pktns = qc->ipktns;
                if (pktns) {
-                       chunk_appendf(&trash, "  [initl] rx.ackrng=%-6zu tx.inflight=%-6zu\n",
-                                     pktns->rx.arngs.sz, pktns->tx.in_flight);
+                       chunk_appendf(&trash, "  [initl] rx.ackrng=%-6zu tx.inflight=%-6zu(%ld%%)\n",
+                                     pktns->rx.arngs.sz, pktns->tx.in_flight,
+                                     pktns->tx.in_flight * 100 / qc->path->cwnd);
                }
 
                pktns = qc->hpktns;
                if (pktns) {
-                       chunk_appendf(&trash, "  [hndshk] rx.ackrng=%-6zu tx.inflight=%-6zu\n",
-                                     pktns->rx.arngs.sz, pktns->tx.in_flight);
+                       chunk_appendf(&trash, "  [hndshk] rx.ackrng=%-6zu tx.inflight=%-6zu(%ld%%)\n",
+                                     pktns->rx.arngs.sz, pktns->tx.in_flight,
+                                     pktns->tx.in_flight * 100 / qc->path->cwnd);
                }
 
                pktns = qc->apktns;
                if (pktns) {
-                       chunk_appendf(&trash, "  [01rtt] rx.ackrng=%-6zu tx.inflight=%-6zu\n",
-                                     pktns->rx.arngs.sz, pktns->tx.in_flight);
+                       chunk_appendf(&trash, "  [01rtt] rx.ackrng=%-6zu tx.inflight=%-6zu(%ld%%)\n",
+                                     pktns->rx.arngs.sz, pktns->tx.in_flight,
+                                     pktns->tx.in_flight * 100 / qc->path->cwnd);
                }
        }