Often I create test cases that are used to measure performance of a certain area. The goal is to isolate a part of code that are important for performance. Using the test time you can get an idea of the performance.
This is far from ideal. as it isn’t clear what these test cases are for by other developers. No comparisons with previous runs. and for each variation you need to add a new test case.
Google benchmark is a library that can provide this. Using this could keep track of performance important parts of the code base in a repeatable and structured way.
My proposal is to add google benchmark to be included in the source tree similar how google test is currently used. See https://github.com/google/benchmark for details about the reporting and ways how to use it.
We currently have benchmark performance test cases for lattice and threading. https://developer.blender.org/D11255 would provide test cases for GPU Batch extraction.