public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 3/5] examples/sendzc: use stdout for stats
Date: Tue,  5 Dec 2023 15:22:22 +0000	[thread overview]
Message-ID: <4401869d414e2d503a8a16e3c3791f5ef86b375d.1701789563.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

stderr is not the right place to print a valid result of the program, use
stdout.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 examples/send-zerocopy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/send-zerocopy.c b/examples/send-zerocopy.c
index 19cf961..9725d0b 100644
--- a/examples/send-zerocopy.c
+++ b/examples/send-zerocopy.c
@@ -596,9 +596,9 @@ int main(int argc, char **argv)
 	tsum = tsum / cfg_nr_threads;
 
 	if (!tsum) {
-		fprintf(stderr, "The run is too short, can't gather stats\n");
+		printf("The run is too short, can't gather stats\n");
 	} else {
-		fprintf(stderr, "packets=%llu (MB=%llu), rps=%llu (MB/s=%llu)\n",
+		printf("packets=%llu (MB=%llu), rps=%llu (MB/s=%llu)\n",
 			packets, bytes >> 20,
 			packets * 1000 / tsum,
 			(bytes >> 20) * 1000 / tsum);
-- 
2.43.0


  parent reply	other threads:[~2023-12-05 15:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 15:22 [PATCH liburing 0/5] send-zc test/bench improvements Pavel Begunkov
2023-12-05 15:22 ` [PATCH liburing 1/5] tests: comment on io_uring zc and SO_ZEROCOPY Pavel Begunkov
2023-12-05 15:22 ` [PATCH liburing 2/5] examples/sendzc: remove get time overhead Pavel Begunkov
2023-12-05 15:22 ` Pavel Begunkov [this message]
2023-12-05 15:22 ` [PATCH liburing 4/5] examples/sendzc: try to print stats on SIGINT Pavel Begunkov
2023-12-05 15:22 ` [PATCH liburing 5/5] examples/sendzc: improve help message Pavel Begunkov
2023-12-05 16:22 ` [PATCH liburing 0/5] send-zc test/bench improvements Jens Axboe

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=4401869d414e2d503a8a16e3c3791f5ef86b375d.1701789563.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /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