Merged in schedPolSwitchLogging-revert (pull request #7)

adding back the call to base#LogSchedPolicySwitch(...). Had removed this addition by mistake when resolving merge conflicts.

Approved-by: Akash Kothawale <akothaw1@binghamton.edu>
Approved-by: Pradyumna Kaushik <pkaushi1@binghamton.edu>
This commit is contained in:
Pradyumna Kaushik 2018-02-19 03:29:56 +00:00
parent 85383da550
commit b569bd3060

View file

@ -33,8 +33,9 @@ func (bsps *baseSchedPolicyState) switchIfNecessary(spc SchedPolicyContext) {
// Switching to a random scheduling policy.
// TODO: Switch based on some criteria.
index := rand.Intn(len(SchedPolicies))
for _, v := range SchedPolicies {
for k, v := range SchedPolicies {
if index == 0 {
baseSchedRef.LogSchedPolicySwitch(k, v)
spc.SwitchSchedPol(v)
// Resetting the number of tasks scheduled.
bsps.numTasksScheduled = 0