-
Notifications
You must be signed in to change notification settings - Fork 0
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
Review suggestions #35
base: psi
Are you sure you want to change the base?
Conversation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
So that no conversion is needed Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
425b027
to
6c1e12d
Compare
type ( | ||
PSIData = cgroups.PSIData | ||
PSIStats = cgroups.PSIStats | ||
) |
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.
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 CpuStats struct { | ||
CpuUsage CpuUsage `json:"cpu_usage,omitempty"` | ||
ThrottlingData ThrottlingData `json:"throttling_data,omitempty"` | ||
PSI PSIStats `json:"psi,omitempty"` | ||
PSI *PSIStats `json:"psi,omitempty"` |
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.
it's preferable to be consistent with the rest, and do the refactoring later.
@@ -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"` |
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.
it's preferable to be consistent with the rest, and do the refactoring later.
@@ -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"` |
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.
it's preferable to be consistent with the rest, and do the refactoring later.
} | ||
} | ||
if err := sc.Err(); err != nil { | ||
err = sc.Err() | ||
if err != nil { |
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 ?
Review suggestions for opencontainers#3358