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