Add RUNNER_PERF_TEST_BEGIN() and RUNNER_PERF_TEST_END() macros for performance tests
Added RUNNER_PERF_TEST_BEGIN(max_time) and RUNNER_PERF_TEST_END() macros.
Add both of these macros in test when you want to do the time measurement.
The first macro is used to start the time measurement, the second is used to
end the measuement. The result will be displayed if and only if the test will
pass. RUNNER_PERF_TEST_BEGIN(time), takes one parameter (type of double) - the
expected time. If the measured time will be shorter than expected then result
will be print in console in green color, otherwise the result will be print
in red. If other output method will be choosen then measured time and max time
(if defined) will be displayed. In TAP output format there is no preformance
results. If you don't want to give any param as the expected time then put 0 or
any negative value (any value <= 0) as a param (RUNNER_PERF_TEST_BEGIN(0)) and
the param will be ignored. In that case the result in console will be always
printed in white.
The precision of measurement is 1 microsecond - the smallest time value
that can be measured is 0.000001s.
Remarks:
* The result of time measurement will be displayed only if the test will pass.
* Make sure that you use each of these macros at most ONCE in each test. In
the other case the result of first measurement will be overrwriten by the
second.
* Make sure that you use macros in right order.
* In case of RUNNER_MULTIPROCESS_TEST the time measurement will wokrs only if
the macors will be used in parent process. If you will use these macros
in the child code then you will see no result.
* The performance results will be displayed only in these output format:
- text
- html
- xml
- csv
[Problem] No framework for performance tests
[Cause] N/A
[Solution] Added RUNNER_PERF_TEST_BEGIN(expected_time) and RUNNER_PERF_TEST_END()
macros.
[Verification] Add these macros to a few passing tests and a few failing tests,
and check if results are displayed correctly.
Change-Id: I9eebaade094fbdf1d2af34e7da2871b7307f89c6
Signed-off-by: Janusz Kozerski <j.kozerski@samsung.com>