[2/5] app/testpmd: add missing newline when showing statistics

Message ID 1550158972-21895-3-git-send-email-david.marchand@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series display testpmd forwarding engine stats on the fly |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

David Marchand Feb. 14, 2019, 3:42 p.m. UTC
  Having the standard stats and the rx burst stats on the same line gives a
really long line and is not consistent with the rest.

Before:
  RX-packets: 3542977        TX-packets: 3542971        TX-dropped: 6               RX-bursts : 499440 [24% of 2 pkts + 15% of 1 pkts + 61% of others]
  TX-bursts : 499440 [24% of 2 pkts + 15% of 1 pkts + 61% of others]

After:
  RX-packets: 4629969        TX-packets: 4629969        TX-dropped: 0
  RX-bursts : 663328 [19% of 2 pkts + 17% of 3 pkts + 64% of others]
  TX-bursts : 663328 [19% of 2 pkts + 17% of 3 pkts + 64% of others]

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Rami Rosen Feb. 19, 2019, 5:48 a.m. UTC | #1
+1
Reviewed-by: Rami Rosen <ramirose at gmail.com>

On Thu, Feb 14, 2019 at 5:43 PM David Marchand <david.marchand@redhat.com>
wrote:

> Having the standard stats and the rx burst stats on the same line gives a
> really long line and is not consistent with the rest.
>
> Before:
>   RX-packets: 3542977        TX-packets: 3542971        TX-dropped: 6
>          RX-bursts : 499440 [24% of 2 pkts + 15% of 1 pkts + 61% of others]
>   TX-bursts : 499440 [24% of 2 pkts + 15% of 1 pkts + 61% of others]
>
> After:
>   RX-packets: 4629969        TX-packets: 4629969        TX-dropped: 0
>   RX-bursts : 663328 [19% of 2 pkts + 17% of 3 pkts + 64% of others]
>   TX-bursts : 663328 [19% of 2 pkts + 17% of 3 pkts + 64% of others]
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  app/test-pmd/testpmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 98c1baa..984155a 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -1459,7 +1459,7 @@ struct extmem_param {
>                "TX Port=%2d/Queue=%2d %s\n",
>                fwd_top_stats_border, fs->rx_port, fs->rx_queue,
>                fs->tx_port, fs->tx_queue, fwd_top_stats_border);
> -       printf("  RX-packets: %-14u TX-packets: %-14u TX-dropped: %-14u",
> +       printf("  RX-packets: %-14u TX-packets: %-14u TX-dropped: %-14u\n",
>                fs->rx_packets, fs->tx_packets, fs->fwd_dropped);
>
>         /* if checksum mode */
> --
> 1.8.3.1
>
>
  

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 98c1baa..984155a 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1459,7 +1459,7 @@  struct extmem_param {
 	       "TX Port=%2d/Queue=%2d %s\n",
 	       fwd_top_stats_border, fs->rx_port, fs->rx_queue,
 	       fs->tx_port, fs->tx_queue, fwd_top_stats_border);
-	printf("  RX-packets: %-14u TX-packets: %-14u TX-dropped: %-14u",
+	printf("  RX-packets: %-14u TX-packets: %-14u TX-dropped: %-14u\n",
 	       fs->rx_packets, fs->tx_packets, fs->fwd_dropped);
 
 	/* if checksum mode */