Repository navigation
Fix Display CPU in mCPU and add 2-decimal memory precision in cards. - #70
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Container Health Dashboard metrics pipeline to improve visibility for low-usage containers by changing CPU display units to millicores and increasing memory precision to 2 decimals, while also switching CPU Prometheus queries to irate() for more burst-sensitive readings.
Changes:
- Display CPU on dashboard cards as
mCPUwith 2-decimal formatting (frontend). - Switch CPU Prometheus queries from
rate()toirate()for both summary and history queries (backend). - Round and display memory usage in MB to 2-decimal precision in both API responses and the UI.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/frontend/src/components/ContainerHealth.vue | Updates CPU card display to mCPU and formats memory usage to 2 decimals. |
| src/backend/utils/container-health.ts | Switches CPU Prometheus queries to irate() for current stats and history. |
| src/backend/health-api.ts | Rounds memory usage values to 2 decimals in health and metrics API responses. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
LGTM!! @Weaver1209 Do GPG signing please, you don't have a verified commit at this stage. As the work is urgent I am ignoring it and merging from next time it should not be same. And PR title should not need to be exactly commit message format. We generally dont use the same convention because title need to be more crisp. Also cuts the end of title and show |
Description
This PR improves metric visibility and precision on the Container Health Dashboard cards for lightweight/static user containers:
mCPUwhere1% = 10 mCPU) with 2 decimal places so low-utilizationcontainers display meaningful numbers instead of
0.00%.rate()toirate()to capture instantaneous CPU bursts rather than diluting short activityacross a 60-second window.
MB).Related Issue
Closes #69
Visual Demonstration (After)
screenrecording-2026-08-20_21-09-22.mp4