mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 22:52:09 +01:00
Despite all the efforts, there still seems to be a lot of noise in the performance measurement. Especially, the first iterations seem to run faster. Maybe that is because the kernel didn't yet determine that the process is CPU bound and is less likely to schedule it out Or maybe it's because burning the cycles heats up the CPU and it gets throttled after a while. It's unclear why, and it's even unclear whether this really happens. But from my observations, it seems to do. Hence, more warm up. - the first time we enter the test, ensure that we keep the CPU busy for at 2 seconds. This additional warm up (WARM_UP_ALWAYS_SEC) is global, and not per test. - for each test, ignore the first 5% of the runs. It seems those tend to run faster, thus skewing the results. - if the user specifies a "--factor", the warm up operations are the same and independent from external factors (such as time measurements). Note that this matters the most, when you want to run the executable twice in a row and compare the results.