diff mbox series

[liburing,3/5] examples/sendzc: use stdout for stats

Message ID 4401869d414e2d503a8a16e3c3791f5ef86b375d.1701789563.git.asml.silence@gmail.com (mailing list archive)
State New
Headers show
Series send-zc test/bench improvements | expand

Commit Message

Pavel Begunkov Dec. 5, 2023, 3:22 p.m. UTC
stderr is not the right place to print a valid result of the program, use
stdout.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 examples/send-zerocopy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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