tests: benchmark: fix code coverage incorrect for latency_measure
tests: benchmark: fix code coverage incorrect for latency_measure

Fixing code coverage data cannot be generated correctly when running
tests/benchmark/latency_measure test suite. This is because the gcov
data do not generate completely when the measuring thread stop. So
our solution is:

In main(), just waiting for the measuring thread to complete before
the gcov data start to dump out, to make sure all the gcov data can
be output completely.

Signed-off-by: Enjia Mai <7a2de2448a1c31432e87f79c5f6556ebbe33f656@intel.com>

galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr