1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-15 08:16:43 +00:00
This commit is contained in:
2020-05-24 02:22:05 +08:00
parent 04832b8b02
commit 73600d3595
4 changed files with 11 additions and 10 deletions

View File

@@ -62,11 +62,11 @@ func (pool *ResourcePool) start() {
for i := 0; i < pool.poolsCount; i++ {
pool.pools = append(pool.pools, PoolSeg{Lock: sync.Mutex{}, IsVirtual: true, ID: i})
}
/* make non-virtual seg */
/* make non-virtual segs */
for i := 0; i < pool.poolsCount/3; i++ {
pool.pools[rand.Intn(pool.poolsCount)].IsVirtual = false
}
/* make working srg */
/* generate working segs */
for i := 0; i < 10; i++ {
pool.pools[rand.Intn(pool.poolsCount)].Nodes = map[string]*NodeStatus{}
}