Skip to content

HowTo: Improving Prediction Models

RRO edited this page Mar 23, 2018 · 1 revision

Currently the Predictions are quite simple. Whenever changes are made to a method, a simple prediction of the new mean execution time is given. The current prediction consists of a simple sum of the known execution times. For loops there is a prediction of the average loop times, which is calculated trough division of the method execution time by the sum of the known execution times inside the loop. An additional slider allows the adjustment of the estimated loop iterations. The newly predicted execution time of the method is propagated upwards in the abstract syntax tree, so that the predicted execution time of all callers is adjusted.

The Predictions are done in the Model MethodPerformanceInfo for Methods and 'LoopPerformanceInfo' for Loops. These classes already have access to the 'IMethodPerformanceData' objects, which contain the collected performance data. Any adjustments to the 'PredictedExecutionTime' are propagated upwards in the abstract syntax tree.

More Compley Prediction Models should be implemented in a way where in the 'MethodPerformanceInfo' can represent the changes.