Emulation of Outliers
is a latency measurement that exceeds the specified deadline.
In real workloads, outliers can happen for multiple reasons. They can originate from the workload itself, such as a rarely executed code branch that takes longer to complete than the default execution flow. System-level latency spikes can also manifest in deadline misses during workload execution. The deadline monitoring capabilities of the measurement library enable you to catch and further analyze such situations.
Naturally occurring deadline violations may take a long time to reproduce in a system optimized for real-time workload execution. To demonstrate the deadline monitoring capabilities of the measurement library in a more controllable way, the sample offers a mode that emulates outliers.
In outlier mode, every fifth iteration of the workload will take longer to complete than the rest. This is achieved by having two implementations of the workload, fast (iterative) and slow (recursive). Both implementations are performing the same task of computing 2/Pi approximation but the recursive works slower as it involves additional function calls. These two implementations represent the case of two unequal code branches, where each fifth iteration runs a slow branch.
When you set an appropriate deadline value in the sample, about 20 percent of iterations will exceed the deadline in outlier mode. System-level latency spikes can introduce additional deadline misses.
The deadline value depends on the value of the
argument, which affects the amount of time each implementation (iterative and recursive) needs to complete the computation. The recommended combination of values can be found in Run the Sample