mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-10 18:03:35 +01:00
By default, the test estimates a run factor for each test. This means, if you run performance under `perf`, the results are not comparable, as the run time depends on the estimated factor. Add an option, to set a fixed factor. Of course, there is only one factor argument for all tests. Quite possibly, you would want to run each test individually with a factor appropriate for the test. On the other hand, all tests should be tuned so that the same factor gives a similar test duration. So this may not be a concern, or the tests should be adjusted. In any case, the option is most useful when running only one test explicitly. You can get a suitable factor by running the test once with "--verbose". Another use case is if you run the benchmark under valgrind. Valgrind slows down the run so much, that the estimated factor would be quite off. As a result, the chosen code paths are different from the real run. By setting the factor, the timing measurements don't affect the executed code.