examples: add flush after stats printing
authorGeorgiy Levashov <georgiy.levashov@oktetlabs.ru>
Tue, 28 Apr 2020 13:27:41 +0000 (14:27 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 24 Jun 2020 22:20:01 +0000 (00:20 +0200)
commit3ee6f706519c0a7456f3d8a79048150dfa6d2581
tree8f6f2e05d97df604cb226b550b56d124744afa9a
parentc79a1c67465d0193b52e2ae4b64dd8362c575b2b
examples: add flush after stats printing

When printf()'s stdout is line-buffered for terminal, it is fully
buffered for pipes. So, stdout listener can only get the output
when it is flushed (on program termination, when buffer is filled or
manual flush).

stdout buffer might fill slowly since every stats report could be small.

Also when it is fully filled it might contain a part of the last stats
report which makes it very inconvenient for any automation which reads
and parses the output.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Georgiy Levashov <georgiy.levashov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
examples/bbdev_app/main.c
examples/ioat/ioatfwd.c
examples/kni/main.c
examples/l2fwd-crypto/main.c
examples/l2fwd-event/main.c
examples/l2fwd-jobstats/main.c
examples/l2fwd-keepalive/main.c
examples/l2fwd/main.c
examples/link_status_interrupt/main.c
examples/tep_termination/main.c
examples/vhost/main.c