DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Bruce Richardson <bruce.richardson@intel.com>,
	dev@dpdk.org
Cc: "Morten Brørup" <mb@smartsharesystems.com>
Subject: [PATCH v2 3/4] mempool perf test: improve output readability
Date: Tue,  1 Apr 2025 15:00:47 +0000	[thread overview]
Message-ID: <20250401150049.4968-4-mb@smartsharesystems.com> (raw)
In-Reply-To: <20250401150049.4968-1-mb@smartsharesystems.com>

Improved the output parameter ordering and formatting for readability.

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 app/test/test_mempool_perf.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 3594d81888..c252f1968a 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -257,11 +257,13 @@ launch_cores(struct rte_mempool *mp, unsigned int cores)
 	/* reset stats */
 	memset(stats, 0, sizeof(stats));
 
-	printf("mempool_autotest cache=%u cores=%u n_get_bulk=%u "
-	       "n_put_bulk=%u n_keep=%u constant_n=%u ",
-	       use_external_cache ?
-		   external_cache_size : (unsigned int) mp->cache_size,
-	       cores, n_get_bulk, n_put_bulk, n_keep, use_constant_values);
+	printf("mempool_autotest cache=%u cores=%u n_keep=%5u ",
+	       use_external_cache ? external_cache_size : (unsigned int) mp->cache_size,
+	       cores,
+	       n_keep);
+	printf("n_get_bulk=%3u n_put_bulk=%3u constant_n=%u ",
+	       n_get_bulk, n_put_bulk,
+	       use_constant_values);
 
 	if (rte_mempool_avail_count(mp) != MEMPOOL_SIZE) {
 		printf("mempool is not full\n");
@@ -301,7 +303,7 @@ launch_cores(struct rte_mempool *mp, unsigned int cores)
 			rate += (double)stats[lcore_id].enq_count * hz /
 					(double)stats[lcore_id].duration_cycles;
 
-	printf("rate_persec=%" PRIu64 "\n", rate);
+	printf("rate_persec=%10" PRIu64 "\n", rate);
 
 	return 0;
 }
@@ -320,9 +322,9 @@ do_one_mempool_test(struct rte_mempool *mp, unsigned int cores, int external_cac
 	unsigned int *keep_ptr;
 	int ret;
 
-	for (get_bulk_ptr = bulk_tab_get; *get_bulk_ptr; get_bulk_ptr++) {
-		for (put_bulk_ptr = bulk_tab_put; *put_bulk_ptr; put_bulk_ptr++) {
-			for (keep_ptr = keep_tab; *keep_ptr; keep_ptr++) {
+	for (keep_ptr = keep_tab; *keep_ptr; keep_ptr++) {
+		for (get_bulk_ptr = bulk_tab_get; *get_bulk_ptr; get_bulk_ptr++) {
+			for (put_bulk_ptr = bulk_tab_put; *put_bulk_ptr; put_bulk_ptr++) {
 
 				if (*keep_ptr < *get_bulk_ptr || *keep_ptr < *put_bulk_ptr)
 					continue;
-- 
2.43.0


  parent reply	other threads:[~2025-04-01 15:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 16:48 [PATCH] mempool perf test: test random bulk sizes Morten Brørup
2025-03-13  8:23 ` Morten Brørup
2025-03-25  7:15   ` Morten Brørup
2025-03-30  8:29 ` Andrew Rybchenko
2025-03-30  8:57   ` Morten Brørup
2025-03-31 10:03 ` [PATCH v2 0/4] " Morten Brørup
2025-03-31 10:03   ` [PATCH v2 1/4] mempool perf test: replace bare unsigned with unsigned int Morten Brørup
2025-03-31 10:03   ` [PATCH v2 2/4] mempool perf test: test default mempool with cache Morten Brørup
2025-03-31 10:03   ` [PATCH v2 3/4] mempool perf test: improve output readability Morten Brørup
2025-03-31 10:03   ` [PATCH v2 4/4] mempool perf test: test random bulk sizes Morten Brørup
2025-03-31 14:48     ` Andrew Rybchenko
2025-04-02  9:07       ` Morten Brørup
2025-03-31 14:48   ` [PATCH v2 0/4] " Andrew Rybchenko
2025-04-01 15:00 ` Morten Brørup
2025-04-01 15:00   ` [PATCH v2 1/4] mempool perf test: replace bare unsigned with unsigned int Morten Brørup
2025-04-01 15:00   ` [PATCH v2 2/4] mempool perf test: test default mempool with cache Morten Brørup
2025-04-01 15:00   ` Morten Brørup [this message]
2025-04-01 15:00   ` [PATCH v2 4/4] mempool perf test: test random bulk sizes Morten Brørup
2025-04-01 15:02 ` [PATCH v3 0/4] " Morten Brørup
2025-04-01 15:02   ` [PATCH v3 1/4] mempool perf test: replace bare unsigned with unsigned int Morten Brørup
2025-04-01 15:02   ` [PATCH v3 2/4] mempool perf test: test default mempool with cache Morten Brørup
2025-04-01 15:02   ` [PATCH v3 3/4] mempool perf test: improve output readability Morten Brørup
2025-04-01 15:02   ` [PATCH v3 4/4] mempool perf test: test random bulk sizes Morten Brørup

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=20250401150049.4968-4-mb@smartsharesystems.com \
    --to=mb@smartsharesystems.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.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 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).