Skip to content

Job Metrics

For each runner, you will also find detailed metrics about the EC2 instance, RunsOn installation, and runner timings. This is available when you expand the โ€œSet up jobโ€ section in the GitHub Actions UI:

Runner metadata right from the GitHub Actions UI
Runner metadata right from the GitHub Actions UI

The runs-on/action@v2 โ†— provides real-time performance metrics collection for individual GitHub Actions jobs. These metrics give you detailed insights into resource utilization during workflow execution.

The way it works is to automatically configure the CloudWatch agent on the instance to collect additional custom metrics, and then display them in the GitHub Actions job summary. Note that CloudWatch custom metrics are not cheap, so make sure you only enable metric collection while troubleshooting. Also the more metrics you collect, the more expensive it will be.

The action can collect the following performance metrics:

Metric TypeAvailable MetricsDescription
CPUusage_user, usage_systemCPU utilization by user processes and system processes
Networkbytes_recv, bytes_sentNetwork traffic in bytes received and sent
Memoryused_percentMemory utilization as a percentage
Diskused_percent, inodes_usedDisk space utilization and inode usage
I/Oio_time, reads, writesDisk I/O time and read/write operations

Enable metrics collection by adding the runs-on/action@v2 to your job and specifying which metrics to collect:

jobs:
build:
runs-on: runs-on=${{ github.run_id }}/runner=2cpu-linux-x64
steps:
- uses: runs-on/action@v2
with:
metrics: cpu,network,memory,disk,io
# Your build steps here
- uses: actions/checkout@v4
- name: Build application
run: npm run build

You can also collect specific metric types:

# Collect only CPU and memory metrics
- uses: runs-on/action@v2
with:
metrics: cpu,memory
# Collect all available metrics
- uses: runs-on/action@v2
with:
metrics: cpu,network,memory,disk,io

After job completion, metrics are displayed as ASCII charts in the GitHub Actions job summary:

๐Ÿ“ˆ Metrics (since 2025-06-30T14:18:56Z):
๐Ÿ“Š CPU User:
100.0 โ”ค
87.5 โ”ค โ•ญโ”€โ•ฎโ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
75.0 โ”ค โ•ญโ•ฏ โ•ฐโ•ฏ โ”‚
62.5 โ”ค โ•ญโ•ฏ โ•ฐโ•ฎ
50.0 โ”ค โ”‚ โ”‚
37.5 โ”ค โ”‚ โ•ฐโ•ฎ
25.0 โ”ค โ•ญโ•ฏ โ”‚
12.5 โ”ค โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎโ•ญโ”€โ”€โ”€โ”€โ”€โ•ฏ โ•ฐโ•ฎ
0.0 โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ•ฐโ•ฏ โ•ฐ
CPU User (Percent)
Stats: min:0.0 avg:29.0 max:93.4 Percent
๐Ÿ“Š Memory Used:
100.0 โ”ค
87.5 โ”ค
75.0 โ”ค
62.5 โ”ค
50.0 โ”ค
37.5 โ”ค
25.0 โ”ค โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
12.5 โ”ค โ•ญโ”€โ”€โ•ฎ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ•ฐโ”€โ”€โ”€โ•ฎ
0.0 โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ•ฐ
Memory Used (Percent)
Stats: min:0.5 avg:7.4 max:20.9 Percent

The metrics help you:

  • Optimize Resource Usage: Identify whether your runner size is appropriate
  • Debug Performance Issues: Spot bottlenecks in CPU, memory, disk I/O, or network
  • Cost Optimization: Right-size your runners based on actual resource consumption
  • Monitor Trends: Track performance changes across builds

You can also find the metrics in the CloudWatch UI and API, under the CWAgent namespace.

Resource Right-sizing:

# Test different runner sizes with metrics
strategy:
matrix:
runner:
- runs-on=${{ github.run_id }}/family=m7a/cpu=2
- runs-on=${{ github.run_id }}/family=m7a/cpu=4
- runs-on=${{ github.run_id }}/family=m7a/cpu=8
runs-on: ${{ matrix.runner }}
steps:
- uses: runs-on/action@v2
with:
metrics: cpu,memory,disk,io
- name: Run build
run: |
# Your build commands
go build ...

Performance Debugging:

# Monitor resource usage during heavy operations
- uses: runs-on/action@v2
with:
metrics: cpu,memory,disk,io
- name: Run resource-intensive build
run: |
# Your build commands
npm run build:prod
docker build -t app .