mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-06-07 14:21:55 +00:00
update
This commit is contained in:
parent
a298fb0216
commit
b9097e6e1a
@ -3,6 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
"strings"
|
"strings"
|
||||||
|
"math/rand"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Mocker struct {
|
type Mocker struct {
|
||||||
@ -93,7 +94,7 @@ func (mocker *Mocker) GetDuration(job Job, nodes []NodeStatus) int {
|
|||||||
|
|
||||||
if vals, ok := durations[jobName]; ok {
|
if vals, ok := durations[jobName]; ok {
|
||||||
if val, ok2 := vals[mode]; ok2 {
|
if val, ok2 := vals[mode]; ok2 {
|
||||||
return val
|
return val * (100 + (rand.Intn(5) - 5)) / 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user