-
Notifications
You must be signed in to change notification settings - Fork 894
feat(cli): add coder stat
command
#8005
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
5db9006
add stat command
johnstcn d6029b4
cpu working on mac
johnstcn 18f4942
add stat memory
johnstcn 251fdda
support values with no total
johnstcn 4c081dc
move clistats to its own package
johnstcn 2ba7392
fix container detection to work with sysbox containers
johnstcn 0e1c96a
add cross-platform declaration for IsContainerized()
johnstcn 0f9859e
add a sync.Once to IsContainerized()
johnstcn a220c7f
make uptime minutes
johnstcn 89f7e8d
lint
johnstcn c51e245
extract nproc to variable
johnstcn 3528c00
add skeleton of cgroup stuff
johnstcn 7108c6e
initial cgroupv2 cpu implementation
johnstcn 4ef5f24
fix disk_windows
johnstcn f0f7b6a
add tests for clistats
johnstcn 6a878b9
improve testing
johnstcn be7ba72
remove unnecessary os-specific implementations now that we have abstr…
johnstcn 3643407
remove uptime stat as it is trivial to implement in bash
johnstcn 1c8943e
implement cgroupv1 cpu
johnstcn 95b8d1f
unskip container memory tests
johnstcn 495b5b0
flesh out tests
johnstcn fa0c4c6
cgroupv1 memory
johnstcn 70ef79b
improve tests to allow testing cpu used
johnstcn 7eeefc1
refactor cpu usage calc
johnstcn 305675f
fix tests
johnstcn d1bb322
fix off-by-10 error
johnstcn eb2bcf6
remove --sample-interval and collect CPU stats in parallel
johnstcn 44edcf3
fmt; gen
johnstcn 0f3254a
make default_cols consistent to avoid ci surprises
johnstcn edd99f4
fix race condition
johnstcn 49b6861
remove UPTIME from test
johnstcn 69b1904
update golden files
johnstcn 7eb526d
add stat subcommands
johnstcn 665bf7f
allow modifying unit prefixes
johnstcn 6b11a5c
update docs and examples
johnstcn c1467f0
fix NaN issue for HostCPU
johnstcn 789c6de
avoid blocking on err chan
johnstcn 482db10
add percentages
johnstcn 0775082
remove outdated comments
johnstcn 73debf8
handle counter reset
johnstcn d0c992a
add test for large difference between used and total
johnstcn ef7460a
auto-scale precision, limiting to 3 digits
johnstcn bec527f
automatically scale precision, remove --prefix arg
johnstcn 08adba7
make gen
johnstcn 78f76e7
improve cli tests
johnstcn 9a82882
update go.mod
johnstcn 19c8a80
Merge remote-tracking branch 'origin/main' into cj/coder-stat
johnstcn eab2530
update go.sum
johnstcn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
cpu working on mac
- Loading branch information
commit d6029b415cdfbf065d383a78beed970ec30d9df0
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit: Please consider it to be more like a homework: Network TX, RX :)
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.
I don't see an immediately obvious way to measure this; I'll address in a follow-up PR.