DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/test-crypto-perf: fix csv format
@ 2019-05-29  6:20 Anoob Joseph
  2019-06-19 14:50 ` Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Anoob Joseph @ 2019-05-29  6:20 UTC (permalink / raw)
  To: Akhil Goyal, Declan Doherty, Pablo de Lara
  Cc: Ankur Dwivedi, Jerin Jacob, dev, Anoob Joseph

From: Ankur Dwivedi <adwivedi@marvell.com>

The format for printing float is incorrect for the following fields
in pmd-cyclecount test: Cycles/Op,Cycles/Enq,Cycles/Deq.

Currently, the format is %.f3. This format will round off the number to
the nearest integer and append a 3 after that.

This patch changes the format to %.3f. This will print the number as a
floating point with a precision of 3 fractional digits.

Fixes: 96dfeb609be1 ("app/crypto-perf: add new PMD benchmarking mode")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
index 92af5ec..f08a226 100644
--- a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
+++ b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
@@ -16,7 +16,7 @@
 #define PRETTY_HDR_FMT "%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n"
 #define PRETTY_LINE_FMT "%12u%12u%12u%12u%12u%12u%12u%12.0f%12.0f%12.0f\n"
 #define CSV_HDR_FMT "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n"
-#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.f3;%.f3;%.f3\n"
+#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.3f;%.3f;%.3f\n"
 
 struct cperf_pmd_cyclecount_ctx {
 	uint8_t dev_id;
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test-crypto-perf: fix csv format
  2019-05-29  6:20 [dpdk-dev] [PATCH] app/test-crypto-perf: fix csv format Anoob Joseph
@ 2019-06-19 14:50 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2019-06-19 14:50 UTC (permalink / raw)
  To: Anoob Joseph, Declan Doherty, Pablo de Lara
  Cc: Ankur Dwivedi, Jerin Jacob, dev, stable

> From: Ankur Dwivedi <adwivedi@marvell.com>
> 
> The format for printing float is incorrect for the following fields
> in pmd-cyclecount test: Cycles/Op,Cycles/Enq,Cycles/Deq.
> 
> Currently, the format is %.f3. This format will round off the number to
> the nearest integer and append a 3 after that.
> 
> This patch changes the format to %.3f. This will print the number as a
> floating point with a precision of 3 fractional digits.
> 
> Fixes: 96dfeb609be1 ("app/crypto-perf: add new PMD benchmarking mode")
> 
> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> ---

Cc stable@dpdk.org
Applied to dpdk-next-crypto

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-19 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29  6:20 [dpdk-dev] [PATCH] app/test-crypto-perf: fix csv format Anoob Joseph
2019-06-19 14:50 ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).