Skip to content

feat(metrics): add disk usage tracking with test demonstration#13

Merged
Garbee merged 5 commits intomainfrom
copilot/add-disk-usage-stats
Feb 14, 2026
Merged

feat(metrics): add disk usage tracking with test demonstration#13
Garbee merged 5 commits intomainfrom
copilot/add-disk-usage-stats

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 14, 2026

Adds disk usage as a third metric alongside CPU and memory. Test workflow now exercises disk allocation to validate the feature.

Metrics Collection

  • Added diskUsageGBs to schema tracking used/free space in GB
  • Collects via systeminformation.fsSize(), summing all mounted filesystems
  • Integrated into both periodic collection (5s intervals) and final snapshot

Visualization

  • Renders "Disk Usages" chart with Cyan (Free) / Purple (Used) stacked bars
  • Y-axis in GB, consistent with other metrics using contextual workflow step labels

Test Coverage

  • Unit tests validate collection, accumulation, and byte-to-GB conversion
  • test-resource-visualization job now creates/deletes 5GB file during CPU step:
    dd if=/dev/zero of=/tmp/test-5gb-file.bin bs=1M count=5120
    # ... CPU intensive work ...
    rm -f /tmp/test-5gb-file.bin
  • Demonstrates ~5GB spike and cleanup in disk usage chart

Implementation

Extracted bytesPerMB and bytesPerGB to src/lib.ts as shared constants (addresses code review feedback on duplication).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 14, 2026 17:05
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
Copilot AI changed the title [WIP] Add disk usage stats as a new metric feat(metrics): add disk usage stats Feb 14, 2026
Copilot AI requested a review from Garbee February 14, 2026 17:10
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
Copilot AI changed the title feat(metrics): add disk usage stats feat(metrics): add disk usage tracking with test demonstration Feb 14, 2026
@Garbee Garbee marked this pull request as ready for review February 14, 2026 17:25
@Garbee Garbee merged commit efd6cfb into main Feb 14, 2026
7 checks passed
@Garbee Garbee deleted the copilot/add-disk-usage-stats branch February 14, 2026 19:24
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