Updated Branches: refs/heads/master 3fca23c8f -> ddf63cb34
adding dengs logs at predicting value logic Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/ddf63cb3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/ddf63cb3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/ddf63cb3 Branch: refs/heads/master Commit: ddf63cb34c4fa7fbd3ee0c81020ab381dd654398 Parents: 3fca23c Author: Lahiru Sandaruwan <[email protected]> Authored: Sat Dec 28 01:36:55 2013 +0530 Committer: Lahiru Sandaruwan <[email protected]> Committed: Sat Dec 28 01:36:55 2013 +0530 ---------------------------------------------------------------------- .../apache/stratos/autoscaler/rule/RuleTasksDelegator.java | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ddf63cb3/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java index 9a1b04e..68da7b1 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java @@ -26,7 +26,15 @@ public class RuleTasksDelegator { public double getPredictedValueForNextMinute(float average, float gradient, float secondDerivative, int timeInterval){ double predictedValue; // s = u * t + 0.5 * a * t * t + if(log.isDebugEnabled()){ + log.debug(String.format("Predicting the value, [average]: %s , [gradient]: %s , [second derivative]" + + ": %s , [time intervals]: %s ", average, gradient, secondDerivative, timeInterval)); + } predictedValue = average + gradient * timeInterval + 0.5 * secondDerivative * timeInterval * timeInterval; + + if(log.isDebugEnabled()){ + log.debug(String.format("Predicted value: %s ", predictedValue)); + } return predictedValue; }
