Skip to content

cleanup printing logic#189

Open
grosser wants to merge 1 commit intorobscott:mainfrom
grosser:grosser/nm
Open

cleanup printing logic#189
grosser wants to merge 1 commit intorobscott:mainfrom
grosser:grosser/nm

Conversation

@grosser
Copy link
Copy Markdown
Contributor

@grosser grosser commented Apr 13, 2025

when trying to add node age I noticed that printing extra node columns was hard,
also that the printers could use some docs + consistency
cc @robscott

Comment thread pkg/capacity/csv.go Outdated

for _, nm := range sortedNodeMetrics {
cp.printNodeLine(nm.name, nm)
for _, nm := range nms {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed so variables are consistent across all the printer methods

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@grosser
Copy link
Copy Markdown
Contributor Author

grosser commented Jun 30, 2025

@robscott 👋

Comment thread pkg/capacity/csv.go Outdated
cp.file = os.Stdout

sortedNodeMetrics := cp.cm.getSortedNodeMetrics(cp.opts.SortBy)
nms := cp.cm.getSortedNodeMetrics(cp.opts.SortBy)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I like the overall idea of shorter variable names, I think these may be too short. I'd prefer nodeMetrics, podMetrics, and containerMetrics, particularly as cms and pms all feel like they could be acronnyms for any number of things.

Copy link
Copy Markdown
Owner

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @grosser! Really appreciate the cleanups here, sorry it's taken so long to get back to review this. Overall LGTM, just would like to keep some of the names longer.

@grosser
Copy link
Copy Markdown
Contributor Author

grosser commented Aug 21, 2025

rebased + renamed, please take another look @robscott

@grosser
Copy link
Copy Markdown
Contributor Author

grosser commented Sep 7, 2025

@robscott

1 similar comment
@grosser
Copy link
Copy Markdown
Contributor Author

grosser commented Apr 3, 2026

@robscott

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