-
Notifications
You must be signed in to change notification settings - Fork 0
Review suggestions #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: psi
Are you sure you want to change the base?
Changes from all commits
43a0111
95e4875
fdfc44a
6d7ec79
ec72c6d
6c1e12d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,14 +40,14 @@ type PSIData struct { | |
| } | ||
|
|
||
| type PSIStats struct { | ||
| Some PSIData `json:"some,omitempty"` | ||
| Full PSIData `json:"full,omitempty"` | ||
| Some *PSIData `json:"some,omitempty"` | ||
| Full *PSIData `json:"full,omitempty"` | ||
| } | ||
|
|
||
| type CpuStats struct { | ||
| CpuUsage CpuUsage `json:"cpu_usage,omitempty"` | ||
| ThrottlingData ThrottlingData `json:"throttling_data,omitempty"` | ||
| PSI PSIStats `json:"psi,omitempty"` | ||
| PSI *PSIStats `json:"psi,omitempty"` | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's preferable to be consistent with the rest, and do the refactoring later. |
||
| } | ||
|
|
||
| type CPUSetStats struct { | ||
|
|
@@ -102,7 +102,7 @@ type MemoryStats struct { | |
| UseHierarchy bool `json:"use_hierarchy"` | ||
|
|
||
| Stats map[string]uint64 `json:"stats,omitempty"` | ||
| PSI PSIStats `json:"psi,omitempty"` | ||
| PSI *PSIStats `json:"psi,omitempty"` | ||
| } | ||
|
|
||
| type PageUsageByNUMA struct { | ||
|
|
@@ -147,7 +147,7 @@ type BlkioStats struct { | |
| IoMergedRecursive []BlkioStatEntry `json:"io_merged_recursive,omitempty"` | ||
| IoTimeRecursive []BlkioStatEntry `json:"io_time_recursive,omitempty"` | ||
| SectorsRecursive []BlkioStatEntry `json:"sectors_recursive,omitempty"` | ||
| PSI PSIStats `json:"psi,omitempty"` | ||
| PSI *PSIStats `json:"psi,omitempty"` | ||
| } | ||
|
|
||
| type HugetlbStats struct { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,9 @@ | ||
| package types | ||
|
|
||
| import "github.com/opencontainers/runc/libcontainer/intelrdt" | ||
| import ( | ||
| "github.com/opencontainers/runc/libcontainer/cgroups" | ||
| "github.com/opencontainers/runc/libcontainer/intelrdt" | ||
| ) | ||
|
|
||
| // Event struct for encoding the event data to json. | ||
| type Event struct { | ||
|
|
@@ -21,17 +24,10 @@ type Stats struct { | |
| NetworkInterfaces []*NetworkInterface `json:"network_interfaces"` | ||
| } | ||
|
|
||
| type PSIData struct { | ||
| Avg10 float64 `json:"avg10"` | ||
| Avg60 float64 `json:"avg60"` | ||
| Avg300 float64 `json:"avg300"` | ||
| Total uint64 `json:"total"` | ||
| } | ||
|
|
||
| type PSIStats struct { | ||
| Some PSIData `json:"some,omitempty"` | ||
| Full PSIData `json:"full,omitempty"` | ||
| } | ||
| type ( | ||
| PSIData = cgroups.PSIData | ||
| PSIStats = cgroups.PSIStats | ||
| ) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my impression was that we tried to make types separate from cgroups as much as possible, hence the disconnection and duplication here. It's reasonable to say that we do not care about the separation (i.e. the types package is not really useful), in that case i would prefer to do the refactoring separately. |
||
|
|
||
| type Hugetlb struct { | ||
| Usage uint64 `json:"usage,omitempty"` | ||
|
|
@@ -82,7 +78,7 @@ type CpuUsage struct { | |
| type Cpu struct { | ||
| Usage CpuUsage `json:"usage,omitempty"` | ||
| Throttling Throttling `json:"throttling,omitempty"` | ||
| PSI PSIStats `json:"psi,omitempty"` | ||
| PSI *PSIStats `json:"psi,omitempty"` | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's preferable to be consistent with the rest, and do the refactoring later. |
||
| } | ||
|
|
||
| type CPUSet struct { | ||
|
|
@@ -113,7 +109,7 @@ type Memory struct { | |
| Kernel MemoryEntry `json:"kernel,omitempty"` | ||
| KernelTCP MemoryEntry `json:"kernelTCP,omitempty"` | ||
| Raw map[string]uint64 `json:"raw,omitempty"` | ||
| PSI PSIStats `json:"psi,omitempty"` | ||
| PSI *PSIStats `json:"psi,omitempty"` | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's preferable to be consistent with the rest, and do the refactoring later. |
||
| } | ||
|
|
||
| type L3CacheInfo struct { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this change ?