-
Notifications
You must be signed in to change notification settings - Fork 167
Add thv status command for detailed workload info #3161
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: main
Are you sure you want to change the base?
Conversation
Implement a new status command that displays comprehensive information about a specific MCP server workload, including resource usage metrics. Features: - Display workload details: name, status, health context, uptime, group, transport, URL, port, PID, CPU usage, and memory usage - Support both text (key-value) and JSON output formats (--format flag) - Add GetWorkloadStats to Runtime interface for CPU/memory metrics - Add StartedAt and ProcessID fields to core.Workload for uptime/PID tracking Components affected: - cmd/thv/app: New status command and tests - pkg/container/docker: GetWorkloadStats implementation with CPU calculation - pkg/container/kubernetes: GetWorkloadStats stub - pkg/container/runtime: WorkloadStats struct and interface updates - pkg/core: Workload struct extended with StartedAt, ProcessID - pkg/workloads: Manager interface and file_status updates - test/e2e: Status command integration tests Closes stacklok#3053 Signed-off-by: carlos <21148423+carlos-gn@users.noreply.github.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3161 +/- ##
=======================================
Coverage 57.07% 57.08%
=======================================
Files 348 348
Lines 34608 34641 +33
=======================================
+ Hits 19753 19775 +22
- Misses 13207 13218 +11
Partials 1648 1648 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: carlos <21148423+carlos-gn@users.noreply.github.com>
3e2a8ba to
d869b45
Compare
f1c30dd to
c1fad6e
Compare
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.
Large PR Detected
This PR exceeds 1000 lines of changes and requires justification before it can be reviewed.
How to unblock this PR:
Add a section to your PR description with the following format:
## Large PR Justification
[Explain why this PR must be large, such as:]
- Generated code that cannot be split
- Large refactoring that must be atomic
- Multiple related changes that would break if separated
- Migration or data transformationAlternative:
Consider splitting this PR into smaller, focused changes (< 1000 lines each) for easier review and reduced risk.
See our Contributing Guidelines for more details.
This review will be automatically dismissed once you add the justification section.
c1fad6e to
d869b45
Compare
Summary
thv status <workload-name>command to display detailed workload information--formatflagGetWorkloadStatsto Runtime interface for CPU/memory metrics from container runtimeStartedAtandProcessIDfields tocore.Workloadfor uptime and PID trackingTest plan
Closes #3053