thanks for details. In out scenario, we have most of the flows with trail and error counters, in other words/to be more specific for image processing; we'll be having cases like we'll lose quality of processing if we optimize more and vice-versa. We are in situation for choosing optimal hits for particular methods. we have no other optimization go. So, we would likely to do this via profiling.
If I could suggest and it won't mess up, the profiling process should be mapped into mathematical calculation, where we could transform the profiling operation, so that it would be working as duplex communicator. If you alter the code, it will alter the calculation, it will display the result and if you alter the result, it will alter the calculation and displays the predicted performance.