Skip to content

Commit a1a8271

Browse files
committed
introduce cpu burst stat
Signed-off-by: zouyee <[email protected]>
1 parent 32dca23 commit a1a8271

File tree

4 files changed

+187
-145
lines changed

4 files changed

+187
-145
lines changed

cgroup2/manager.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,12 @@ func (c *Manager) Stat() (*stats.Metrics, error) {
590590
ThrottledUsec: out["throttled_usec"],
591591
PSI: getStatPSIFromFile(filepath.Join(c.path, "cpu.pressure")),
592592
}
593+
if nr_bursts, ok := out["nr_bursts"]; ok {
594+
metrics.CPU.NrBursts = nr_bursts
595+
}
596+
if burst_usec, ok := out["burst_usec"]; ok {
597+
metrics.CPU.BurstUsec = burst_usec
598+
}
593599
metrics.Memory = &stats.MemoryStat{
594600
Anon: out["anon"],
595601
File: out["file"],

0 commit comments

Comments
 (0)