1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-06 22:01:55 +00:00
This commit is contained in:
Newnius 2020-06-14 21:29:43 +08:00
parent a298fb0216
commit b9097e6e1a

View File

@ -3,6 +3,7 @@ package main
import (
"sync"
"strings"
"math/rand"
)
type Mocker struct {
@ -93,7 +94,7 @@ func (mocker *Mocker) GetDuration(job Job, nodes []NodeStatus) int {
if vals, ok := durations[jobName]; ok {
if val, ok2 := vals[mode]; ok2 {
return val
return val * (100 + (rand.Intn(5) - 5)) / 100
}
}
}