Skip to content
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

Open
wants to merge 6 commits into
base: psi
Choose a base branch
from
Open

Conversation

thaJeztah
Copy link

Review suggestions for opencontainers#3358

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>
type (
PSIData = cgroups.PSIData
PSIStats = cgroups.PSIStats
)
Copy link
Owner

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"`
Copy link
Owner

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"`
Copy link
Owner

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"`
Copy link
Owner

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 {
Copy link
Owner

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants