File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,12 @@ func statCpu(dirPath string, stats *cgroups.Stats) error {
108108
109109 case "throttled_usec" :
110110 stats .CpuStats .ThrottlingData .ThrottledTime = v * 1000
111+
112+ case "nr_bursts" :
113+ stats .CpuStats .BurstData .BurstsPeriods = v
114+
115+ case "burst_usec" :
116+ stats .CpuStats .BurstData .BurstTime = v * 1000
111117 }
112118 }
113119 if err := sc .Err (); err != nil {
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ type ThrottlingData struct {
99 ThrottledTime uint64 `json:"throttled_time,omitempty"`
1010}
1111
12+ type BurstData struct {
13+ // Number of periods bandwidth burst occurs
14+ BurstsPeriods uint64 `json:"bursts_periods,omitempty"`
15+ // Cumulative wall-time that any cpus has used above quota in respective periods
16+ // Units: nanoseconds.
17+ BurstTime uint64 `json:"burst_time,omitempty"`
18+ }
19+
1220// CpuUsage denotes the usage of a CPU.
1321// All CPU stats are aggregate since container inception.
1422type CpuUsage struct {
@@ -48,6 +56,7 @@ type CpuStats struct {
4856 CpuUsage CpuUsage `json:"cpu_usage,omitempty"`
4957 ThrottlingData ThrottlingData `json:"throttling_data,omitempty"`
5058 PSI * PSIStats `json:"psi,omitempty"`
59+ BurstData BurstData `json:"burst_data,omitempty"`
5160}
5261
5362type CPUSetStats struct {
You can’t perform that action at this time.
0 commit comments