vendor: update google/cadvisor and opencontainers/runc

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2020-06-24 10:56:34 +02:00
parent 78d295d168
commit a6a3bf2eb4
632 changed files with 36493 additions and 89280 deletions

View File

@@ -47,9 +47,10 @@ type Node struct {
}
type Core struct {
Id int `json:"core_id"`
Threads []int `json:"thread_ids"`
Caches []Cache `json:"caches"`
Id int `json:"core_id"`
Threads []int `json:"thread_ids"`
Caches []Cache `json:"caches"`
SocketID int `json:"socket_id"`
}
type Cache struct {
@@ -70,6 +71,19 @@ func (n *Node) FindCore(id int) (bool, int) {
return false, -1
}
// FindCoreByThread returns bool if found Core with same thread as provided and it's index in Node Core array.
// If it's not found, returns false and -1.
func (n *Node) FindCoreByThread(thread int) (bool, int) {
for i, n := range n.Cores {
for _, t := range n.Threads {
if t == thread {
return true, i
}
}
}
return false, -1
}
func (n *Node) AddThread(thread int, core int) {
var coreIdx int
if core == -1 {