Measurement
Measurement is the most common method of worst-case execution time estimation in commercial use today. Measurement techniques insert profiling code into the software, recording the end-to-end execution time of sub-systems, functions, or individual blocks of code.
Advantages:
- Measurement provides an initial indication of the execution time performance of software components.
- The measurements are observations of the timing behaviour of the actual hardware.
- Execution time measurements are easy to obtain during testing.
Disadvantages:
- During testing, it is difficult to ensure that the worst-case path has been taken.
- It is also difficult to ensure that the functions and loops on a given path have exhibited their worst-case execution times simultaneously.
- For complex software, running on advanced microprocessors, the longest observed end-to-end execution time is likely to be less than the actual worst-case time.
- Measurements alone are rarely sufficient to provide high levels of confidence in the worst-case timing behaviour of the system.
Alternative methods of WCET estimation include static analysis, and hybrid approaches combining both static analysis and measurement techniques.

