Accurate Measurement of Small Execution Times—Getting Around Measurement Errors
Carlos Moreno, Sebastian Fischmeister · IEEE Embedded Systems Letters · 2017
Engineers and researchers often require accurate measurements of small execution times or duration of events in a program. Errors in the measurement facility can introduce important challenges, especially when measuring small intervals. Mitigating approaches commonly used exhibit several issues; in particular, they only reduce the effect of the error, and never eliminate it. In this letter, we propose a technique to effectively eliminate measurement errors and obtain a robust statistical estimate of execution time or duration of events in a program. The technique is simple to implement, yet it entirely eliminates the systematic (nonrandom) component of the measurement error, as opposed to simply reduce it. Experimental results confirm the effectiveness of the proposed method.