| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A GitHub Action for collecting system metrics during workflows.
Note: This is a fork of dev-hato/actions-workflow-metrics with improvements focused on accessibility and reliability. This fork improves accessibility by presenting data in clear tables instead of relying on Mermaid graphs to convey information. It also improves handling by not running a server in the background, making it less likely to conflict with operations under examination.
GitHub Actions runners have fixed resource limits. When workflows run slow or fail unexpectedly, it's often unclear whether you're hitting CPU, memory, or disk constraints. This action gives you immediate visibility into resource usage patterns during your workflow execution.
What you'll learn:
The metrics are displayed directly in your GitHub Actions job summary—no external services or complex setup required. Your team can see the data immediately after each workflow run.
For comprehensive monitoring needs, consider enterprise solutions:
If an external team monitors CI/CD performance or you need rich historical analysis and alerting, these enterprise solutions are more appropriate. This action is designed for teams who want straightforward, in-context resource monitoring without the overhead of external systems.
The output rendered into a step summary contains the metrics collected and if any alerts were triggered those are rendered as well.
A line entry in the alert area is added for each resource that triggered an alert. If no alerts were triggered, then this section is not rendered at all.
Warning
⚠️ Memory utilization exceeded 85% (86.8%) 🔥 Sustained CPU usage above 90% for more than 10 seconds (92.0%) 💾 Disk usage exceeded 85% (85.2%)
Note
Metrics are displayed in collapsible sections.
Shows CPU utilization over time with timestamps.
| Timestamp | Used | Available |
|---|---|---|
| 2026-02-16T11:25:30.123Z | 15.45% | 84.55% |
| 2026-02-16T11:25:35.456Z | 23.78% | 76.22% |
| 2026-02-16T11:25:40.789Z | 8.12% | 91.88% |
Shows memory utilization over time with timestamps.
| Timestamp | Used | Available |
|---|---|---|
| 2026-02-16T11:25:30.123Z | 1024.50 MB | 14965.98 MB |
| 2026-02-16T11:25:35.456Z | 2048.75 MB | 13941.73 MB |
| 2026-02-16T11:25:40.789Z | 1536.25 MB | 14454.23 MB |
Shows disk usage over time with timestamps.
| Timestamp | Used | Available |
|---|---|---|
| 2026-02-16T11:25:30.123Z | 57.73 GB | 86.51 GB |
| 2026-02-16T11:25:35.456Z | 62.85 GB | 81.39 GB |
| 2026-02-16T11:25:40.789Z | 58.12 GB | 86.12 GB |
This action is designed to be executed at the beginning of a workflow.
name: Example Workflow
on: [push]
jobs:
example:
runs-on: ubuntu-latest
steps:
# Run runner-resource-usage at the beginning of the workflow
- name: Start Workflow Telemetry
uses: garbee/runner-resource-usage@v1
# Subsequent regular steps
- name: Checkout
uses: actions/checkout@v6
- name: Run tests
run: pnpm test
# ... other stepsThe action will automatically:
For teams that want metric collection available but not always running, you can conditionally enable the action using the runner.debug context. This allows you to leave the action in your workflow without incurring the performance overhead on every run.
name: Example Workflow
on: [push]
jobs:
example:
runs-on: ubuntu-latest
steps:
# Only collect metrics when debug mode is enabled
- name: Start Workflow Telemetry
if: ${{ runner.debug == '1' }}
uses: garbee/runner-resource-usage@v1
# Regular workflow steps
- name: Checkout
uses: actions/checkout@v6
- name: Run tests
run: pnpm test
# ... other stepsEnabling debug mode:
When you need to collect metrics, enable debug mode by:
This approach provides several benefits:
The runner.debug context is documented in the GitHub Actions contexts reference.
| Input | Description | Required | Default |
|---|---|---|---|
| interval_seconds | Interval between metrics collection in seconds | No | 5 |
| memory_alert_threshold | Memory utilization threshold percentage (0-100) | No | 80 |
| cpu_alert_threshold | Sustained CPU usage threshold percentage (0-100) | No | 85 |
| cpu_alert_duration | Duration in seconds CPU must be sustained above threshold | No | 60 |
| disk_alert_threshold | Disk usage threshold percentage (0-100) | No | 90 |
Note
Metrics are displayed with timestamps rather than correlated with specific workflow steps. You can manually correlate metrics with your workflow steps by matching timestamps with the execution times shown in your workflow run logs.
pnpm ciThis automatically runs gitleaks on commit. It checks for sensitive information like API keys or tokens.
# Bundle for operation in a workflow
pnpm build
# Run unit tests (Node test runner)
pnpm testsrc/
├── lib.ts # Common schema and configuration
├── main/
│ ├── index.ts # main entry point (collector startup)
│ ├── collector.ts # Background metrics collection process
│ ├── metrics.ts # Metrics class (metrics management)
│ └── metrics.test.ts # Metrics class tests
└── post/
├── index.ts # post entry point (job summary output)
├── lib.ts # Metrics fetch, alert detection, and rendering
├── lib.test.ts # Rendering logic tests
├── renderer.ts # Table generation
├── renderer.test.ts # Table generation tests
└── alerts.test.ts # Alert detection tests
| Back | FazBrowse Home | New Git URL |