Add actual disk utilization metric by component#170
Open
sjmiller609 wants to merge 4 commits intomainfrom
Open
Add actual disk utilization metric by component#170sjmiller609 wants to merge 4 commits intomainfrom
sjmiller609 wants to merge 4 commits intomainfrom
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
hypeman_disk_utilization_bytesfor actual filesystem usage by storage componenthypeman_resources_disk_breakdown_bytesas the existing allocation/provisioned viewTesting
go test ./lib/diskutilization ./lib/resourcesdev-yul-hypeman-1against the live filesystem without deploying Hypeman changes there firstrootfs_overlays, which differed by only 208 KiB across separate runs, consistent with normal live filesystem driftNote
Medium Risk
Introduces a new filesystem-walking collector in the resource monitoring refresh loop; bugs or performance regressions could affect monitoring refresh latency and metric correctness, but it does not change core scheduling or data paths.
Overview
Adds a new
lib/diskutilizationcollector that measures actual filesystem allocated bytes (sparse-aware viastat.Blocks) for Hypeman storage components, including snapshot classification (compressed/uncompressed/other).Integrates this into resource monitoring by caching the collected breakdown in the monitoring snapshot and exporting it as a new Prometheus/OTel gauge
hypeman_disk_utilization_bytes(keeping the existinghypeman_resources_disk_breakdown_bytesas the provisioned/allocation view), with tests covering sparse-file accounting, snapshot classification, and that scrapes read cached values until the next refresh.Written by Cursor Bugbot for commit f58e598. This will update automatically on new commits. Configure here.