Reverted the cgroups interleaving - Should be OK
This commit is contained in:
@@ -216,7 +216,6 @@ export class CgroupsCollector extends EventEmitter {
|
|||||||
/** @type {Array<{ id: string, title: string, path: string }>|null} */
|
/** @type {Array<{ id: string, title: string, path: string }>|null} */
|
||||||
this._cgCache = null
|
this._cgCache = null
|
||||||
this._cgTs = 0
|
this._cgTs = 0
|
||||||
this._cgTick = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
@@ -286,9 +285,6 @@ export class CgroupsCollector extends EventEmitter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const cgList = this._cgCache
|
const cgList = this._cgCache
|
||||||
const doMemDetail = this._cgTick % 5 === 0
|
|
||||||
const doPressure = this._cgTick % 3 === 0
|
|
||||||
this._cgTick++
|
|
||||||
|
|
||||||
for (const cg of cgList) {
|
for (const cg of cgList) {
|
||||||
const title = resolveContainerLabel(cg.title, this._names)
|
const title = resolveContainerLabel(cg.title, this._names)
|
||||||
@@ -351,10 +347,7 @@ export class CgroupsCollector extends EventEmitter {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
let memStat = null
|
const memStat = profile('memStat:' + cg.id.slice(0,20), () => parseMemoryStat(cg.path))
|
||||||
if (doMemDetail) {
|
|
||||||
memStat = profile('memStat:' + cg.id.slice(0,20), () => parseMemoryStat(cg.path))
|
|
||||||
}
|
|
||||||
if (memStat) {
|
if (memStat) {
|
||||||
batch.push({
|
batch.push({
|
||||||
chart: memDetailDef.id,
|
chart: memDetailDef.id,
|
||||||
@@ -381,7 +374,6 @@ export class CgroupsCollector extends EventEmitter {
|
|||||||
values: { throttled: throttlePct },
|
values: { throttled: throttlePct },
|
||||||
})
|
})
|
||||||
|
|
||||||
if (doPressure) {
|
|
||||||
for (const kind of ['cpu', 'memory', 'io']) {
|
for (const kind of ['cpu', 'memory', 'io']) {
|
||||||
const some10 = parsePressureSome10(cg.path, kind)
|
const some10 = parsePressureSome10(cg.path, kind)
|
||||||
if (some10 == null) continue
|
if (some10 == null) continue
|
||||||
@@ -394,7 +386,6 @@ export class CgroupsCollector extends EventEmitter {
|
|||||||
values: { some10 },
|
values: { some10 },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
this.prev.set(cg.id, {
|
this.prev.set(cg.id, {
|
||||||
usage: usageUsec,
|
usage: usageUsec,
|
||||||
|
|||||||
Reference in New Issue
Block a user