Skip to content

Commit 98c5798

Browse files
committed
Omit Failcnt in json
I don't see why this should be special, it feels wired in some stat sections such as kernel memory and swap memory which have only Failcnt with 0 value. Signed-off-by: Qiang Huang <[email protected]>
1 parent 248b97e commit 98c5798

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcontainer/cgroups/stats.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type CpuStats struct {
3535
type MemoryData struct {
3636
Usage uint64 `json:"usage,omitempty"`
3737
MaxUsage uint64 `json:"max_usage,omitempty"`
38-
Failcnt uint64 `json:"failcnt"`
38+
Failcnt uint64 `json:"failcnt,omitempty"`
3939
}
4040
type MemoryStats struct {
4141
// memory used for cache
@@ -77,7 +77,7 @@ type HugetlbStats struct {
7777
// maximum usage ever recorded.
7878
MaxUsage uint64 `json:"max_usage,omitempty"`
7979
// number of times htgetlb usage allocation failure.
80-
Failcnt uint64 `json:"failcnt"`
80+
Failcnt uint64 `json:"failcnt,omitempty"`
8181
}
8282

8383
type Stats struct {

0 commit comments

Comments
 (0)