File tree 2 files changed +15
-0
lines changed
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 {
108
108
109
109
case "throttled_usec" :
110
110
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
111
117
}
112
118
}
113
119
if err := sc .Err (); err != nil {
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ type ThrottlingData struct {
9
9
ThrottledTime uint64 `json:"throttled_time,omitempty"`
10
10
}
11
11
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
+
12
20
// CpuUsage denotes the usage of a CPU.
13
21
// All CPU stats are aggregate since container inception.
14
22
type CpuUsage struct {
@@ -48,6 +56,7 @@ type CpuStats struct {
48
56
CpuUsage CpuUsage `json:"cpu_usage,omitempty"`
49
57
ThrottlingData ThrottlingData `json:"throttling_data,omitempty"`
50
58
PSI * PSIStats `json:"psi,omitempty"`
59
+ BurstData BurstData `json:"burst_data,omitempty"`
51
60
}
52
61
53
62
type CPUSetStats struct {
You can’t perform that action at this time.
0 commit comments