Important: Please read the Qt Code of Conduct -

QTestLib, benchmarks and iterations | Improving the accuracy of benchmarks with the -minimumtotal option

  • QTestLib comes with quite useful benchmarking functionality. All it takes to make an existing unit test into a benchmark is to wrap the relevant code with the QBENCHMARK macro. Benchmarks are often influenced by warm-up biases and jitter, leading to variance of results when repeating the same benchmark. The option -iterations can be used to specify how many times a benchmark should be executed and the results aggregated. The displayed result will be the average of the benchmark runs, reducing that variance. Some benchmarks, however, cannot be repeated like that, because they will not execute the same operations when repeated. To control the variance of benchmark results in such situations, the -minimumtotal option was added to QTestLib benchmarks. "Read more...":

Log in to reply