formatted the code

This commit is contained in:
Pradyumna Kaushik 2016-11-25 17:42:08 -05:00 committed by Renan DelValle
parent f6ec974182
commit 81d795f197
4 changed files with 113 additions and 111 deletions

View file

@ -47,7 +47,6 @@ func UpdateCapMargin(new_cap_margin float64) bool {
}
}
// Threshold factor that would make (Cap_margin * task.Watts) equal to (60/100 * task.Watts).
var Starvation_factor = 0.8
@ -73,7 +72,7 @@ func AddTotalPowerForHost(host string, total_power float64) bool {
}
// Window size for running average
var Window_size = 160
var Window_size = 10
// Update the window size.
func UpdateWindowSize(new_window_size int) bool {

View file

@ -118,6 +118,9 @@ A recapping strategy which decides between 2 different recapping schemes.
2. A scheme based on the average of the loads on each node in the cluster.
The recap value picked the least among the two.
The cleverRecap scheme works well when the cluster is relatively idle and until then,
the primitive recapping scheme works better.
*/
func (capper clusterwideCapper) cleverRecap(total_power map[string]float64,
task_monitor map[string][]def.Task, finished_taskId string) (float64, error) {
@ -153,7 +156,7 @@ func (capper clusterwideCapper) cleverRecap(total_power map[string]float64,
}
// Updating task monitor. If recap(...) has deleted the finished task from the taskMonitor,
// then this will be ignored.
// then this will be ignored. Else (this is only when an error occured with recap(...)), we remove it here.
if host_of_finished_task != "" && index_of_finished_task != -1 {
log.Printf("Removing task with task [%s] from the list of running tasks\n",
task_monitor[host_of_finished_task][index_of_finished_task].TaskID)