Skip to content

Commit 834324e

Browse files
authored
Merge pull request #363 from zouyee/cpu-burst-stat
introduce cpu burst stat
2 parents f4ddea3 + a1a8271 commit 834324e

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)