Skip to contentSkip to conversation

app/test-crypto-perf: fix csv format

PATCH In review Anoob Joseph 2 participants 2 messages May 29, 2019 – Jun 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/test-crypto-perf: fix csv format

From: Ankur Dwivedi <[email protected]>

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")
---
 app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-crypto-perf/cperf_test_pmd_cyclecount.c +1 -1
index 92af5ec..f08a226 100644
@@ -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;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 8 lines

From: Ankur Dwivedi <[email protected]>

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.

Quoted 8 lines

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")

---

Cc [email protected]
Applied to dpdk-next-crypto

Thanks.