mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-13 07:46:43 +00:00
update
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user