Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions src/autoscalesim/applicationprovider/autoscaling/Analyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void doAnalysis(){
// RESOURCE-AWARE
cpuUtilization = ANLZ_CPUUtil();
vmCount = ANLZ_VMCount();
throughput = ANLZL_Throughput();
throughput = ANLZ_Throughput();

// SLA-AWARE
responseTime = ANLZ_ResponseTime();
Expand Down Expand Up @@ -139,7 +139,7 @@ private double ANLZ_CPUUtil(){

double parameterList[] = new double[window];
for(int i = 0; i< window;i++){
parameterList[i] = tmpVmHistoryList.get(sizeVmHistory - 1 - i).getCpuUtilizationByAllTier();
parameterList[i] = tmpVmHistoryList.get(sizeVmHistory - (window-i)).getCpuUtilizationByAllTier();
}


Expand Down Expand Up @@ -198,7 +198,7 @@ private double ANLZ_VMCount(){

double parameterList[] = new double[window];
for(int i = 0; i< window;i++){
parameterList[i] = tmpVmHistoryList.get(sizeVmHistory - 1 - i).getVms();
parameterList[i] = tmpVmHistoryList.get(sizeVmHistory - (window-i)).getVms();
}


Expand Down Expand Up @@ -257,7 +257,7 @@ private double ANLZ_Throughput(){

double parameterList[] = new double[window];
for(int i = 0; i< window;i++){
parameterList[i] = tmpVmHistoryList.get(sizeVmHistory - 1 - i).getThroughputFinishedCloudletsAllTiers();
parameterList[i] = tmpVmHistoryList.get(sizeVmHistory - (window-i)).getThroughputFinishedCloudletsAllTiers();
}


Expand Down Expand Up @@ -316,7 +316,7 @@ private double ANLZ_ResponseTime(){

double parameterList[] = new double[window];
for(int i = 0; i< window;i++){
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - 1 - i).getAvgResponseTimePerAllTiers();
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - (window-i)).getAvgResponseTimePerAllTiers();
}


Expand Down Expand Up @@ -375,7 +375,7 @@ private double ANLZ_DelayTime(){

double parameterList[] = new double[window];
for(int i = 0; i< window;i++){
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - 1 - i).getAvgDelayTimePerAllTiers();
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - (window-i)).getAvgDelayTimePerAllTiers();
}


Expand Down Expand Up @@ -434,7 +434,7 @@ private double ANLZ_SLAVCount(){

double parameterList[] = new double[window];
for(int i = 0; i< window;i++){
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - 1 - i).getSlavNumberByAllTier();
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - (window-i)).getSlavNumberByAllTier();
}


Expand Down Expand Up @@ -494,7 +494,7 @@ private double ANLZ_SLAVPercentage(){

double parameterList[] = new double[window];
for(int i = 0; i< window;i++){
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - 1 - i).getSlavPercent();
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - (window-i)).getSlavPercent();
}


Expand Down Expand Up @@ -553,7 +553,7 @@ private double ANLZ_SLAVTime(){

double parameterList[] = new double[window];
for(int i = 0; i< window;i++){
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - 1 - i).getSlavSecondByAlltier();
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - (window-i)).getSlavSecondByAlltier();
}


Expand Down Expand Up @@ -613,7 +613,7 @@ private double ANLZ_FailedCloudlet(){

double parameterList[] = new double[window];
for(int i = 0; i< window;i++){
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - 1 - i).getCloudletFailedCounter();
parameterList[i] = tmpSLAHistoryList.get(sizeSLAHistory - (window-i)).getCloudletFailedCounter();
}


Expand Down Expand Up @@ -674,8 +674,11 @@ private double ANLZ_FutureWorkload(){

double parameterList[] = new double[window];
for(int i = 0; i< window;i++){
parameterList[i] = tmpEndUserHistoryList.get(sizeEndUserHistory - 1 - i).getRequestsPerAllTier();
// parameterList[i] = tmpEndUserHistoryList.get(sizeEndUserHistory - 1 - i).getRequestsPerAllTier();
parameterList[i] = tmpEndUserHistoryList.get(sizeEndUserHistory - (window-i)).getRequestsPerAllTier();

}



//Index 9 of AnalysisMethod variable indicates the analyzing method for analyzing 'Future Workload'
Expand Down