examples/l2fwd-jobstats: add new example
authorPawel Wodkowski <pawelx.wodkowski@intel.com>
Tue, 24 Feb 2015 16:33:24 +0000 (17:33 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 25 Feb 2015 09:23:31 +0000 (10:23 +0100)
commit204896f8d66cb74c31283cbf201788e7c5505697
tree96324186a996273a3ee9f4ea5f7fe3e6f5ed211b
parent9bacd1753512dd519cfee37bdabfacfa3aa488fa
examples/l2fwd-jobstats: add new example

This app demonstrate usage of new rte_jobstats library.
It is basically the orginal l2fwd with following modifications to met
library requirements:
- main_loop() was split into two jobs: forward job and flush job. Logic
for those jobs is almost the same as in original application.
- stats is moved to rte_alarm callback to not introduce overhead of
printing.
- stats are expanded to show rte_jobstats statistics.
- added new parameter '-l' to automatic thousands separator.

Comparing original l2fwd and l2fwd-jobstats apps will show approach what
is needed to properly write own application with rte_jobstats
measurements.

New available statistics:
- Total and % of fwd and flush execution time
- management time - overhead of rte_timer + overhead of rte_jobstats
library
- Idle time and % of time spent waiting for fwd or flush to be ready to
execute.
- per job execution time and period.

Fixes: 2caeb8c0141d ("examples/l2fwd-jobstats: new example")
[Thomas: files were missing in the previous commit]

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
examples/l2fwd-jobstats/Makefile [new file with mode: 0644]
examples/l2fwd-jobstats/main.c [new file with mode: 0644]