mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-06-06 22:01:55 +00:00
update
This commit is contained in:
parent
cb9f752baf
commit
beee8bb286
12
README.md
12
README.md
@ -36,4 +36,16 @@ GPU is occupied by which job(s)
|
||||
**UpdateMaxParallelism**
|
||||
```
|
||||
?action=debug_update_parallelism¶llelism=5
|
||||
```
|
||||
|
||||
|
||||
**getAllPredicts**
|
||||
```
|
||||
?action=debug_get_predicts
|
||||
```
|
||||
|
||||
|
||||
**getAllGPUUtils**
|
||||
```
|
||||
?action=debug_get_gpu_utils
|
||||
```
|
14
src/main.go
14
src/main.go
@ -189,6 +189,20 @@ func serverAPI(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write(js)
|
||||
break
|
||||
|
||||
case "debug_get_predicts":
|
||||
log.Debug("debug_get_predicts")
|
||||
js, _ := json.Marshal(InstanceOfOptimizer().getAllPredicts())
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.Write(js)
|
||||
break
|
||||
|
||||
case "debug_get_gpu_utils":
|
||||
log.Debug("debug_get_gpu_utils")
|
||||
js, _ := json.Marshal(InstanceOfOptimizer().getAllGPUUtils())
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.Write(js)
|
||||
break
|
||||
|
||||
default:
|
||||
http.Error(w, "Not Found", http.StatusNotFound)
|
||||
break
|
||||
|
@ -84,8 +84,6 @@ func (optimizer *Optimizer) feed(job string, utils []int) {
|
||||
predict.Main = predict.Total - predict.Pre - predict.Post
|
||||
predict.Version++
|
||||
}
|
||||
log.Info(optimizer.jobUtilsGPU)
|
||||
log.Info(optimizer.predicts)
|
||||
}()
|
||||
}
|
||||
|
||||
@ -115,3 +113,11 @@ func (optimizer *Optimizer) predictTime(job string) (*OptimizerJobExecutionTime,
|
||||
}
|
||||
return &OptimizerJobExecutionTime{}, false
|
||||
}
|
||||
|
||||
func (optimizer *Optimizer) getAllPredicts() map[string]*OptimizerJobExecutionTime {
|
||||
return optimizer.predicts
|
||||
}
|
||||
|
||||
func (optimizer *Optimizer) getAllGPUUtils() map[string]int {
|
||||
return optimizer.jobUtilsGPU
|
||||
}
|
||||
|
@ -314,8 +314,6 @@ func (scheduler *SchedulerFair) ReleaseResource(job Job, agent NodeStatus) {
|
||||
pool.poolsMu[poolID].Lock()
|
||||
defer pool.poolsMu[poolID].Unlock()
|
||||
|
||||
log.Info(agent)
|
||||
|
||||
node := pool.pools[poolID][agent.ClientID]
|
||||
for _, gpu := range agent.Status {
|
||||
for j := range node.Status {
|
||||
|
Loading…
Reference in New Issue
Block a user