Skip to content

Home / Blog / Speed

How do I track CI metrics like build time, failure rate and queue time in GitHub Actions?

GitHub shows average run time, queue time and failure rate. How the built-in metrics work, what they leave out, and how to get a p50 and p95 from the webhook.

Start with GitHub’s built-in performance metrics: average run times, average queue times and failure rates by workflow, job, repository, operating system and runner type, on all GitHub Cloud plans since 14 March 2025. They are averages, so for a p50 or p95, or a history longer than a year, record each job’s workflow_job webhook event and work the percentiles out yourself. If you find GitHub Actions slow, our guide has more fixes.

In short
  • GitHub's built-in performance metrics show average run time, average queue time and failure rate, by workflow, job, repository, OS and runner type.
  • They became generally available on 14 March 2025 for repositories and organisations, on all GitHub Cloud plans.
  • A custom range spans at most 100 days, and the page does not define queue time or failure rate.
  • For a p50 or p95, record each workflow_job webhook event and compute the percentiles yourself.
  • Keep queue time and run time as two series, since they have different causes.

Where are GitHub’s built-in metrics?

For an organisation: your profile picture, then Organizations, your organisation, Insights, and then Actions Usage Metrics or Actions Performance Metrics. A Period control sets the range (the current week, the current month, the last month, the last 30 or 90 days, the last year, or a custom range of up to 100 days that starts no more than a year back), and a Filter control narrows by a metric. Days are counted in UTC, and skipped runs and zero-minute runs are left out. GitHub’s changelog of 14 March 2025 says the performance metrics became generally available for repositories and organisations that day, with twelve months of history, and that repository members see a repository’s and organisation members see the organisation’s. Enterprise-level metrics were in public preview then, and we did not re-check their status today.

What the metrics page does not give you is a definition. It says “average run times, average queue times, and failure rates” and does not say how queue time or failure rate is worked out. The organisation page names a custom role, “View organization Actions metrics”, in the context of usage metrics, and does not say whether it covers the performance view.

What do queue time, run time and failure rate mean?

GitHub’s job page lists the timestamp fields (created_at, started_at and completed_at) and the values of the status and conclusion without describing them. The readings below are ours, and the usual ones; compare the result with a job whose timing you can see on its run page before you trust it.

MeasureHow we work it outWhy it is kept apart
Queue timestarted_at minus created_atIt is the wait for a machine, and includes a wait for approval. In our reading the cause is capacity or a label that matches no runner, not your workflow.
Run timecompleted_at minus started_atIt is your workflow. A slow build and a long wait have different fixes.
Failure rateJobs whose conclusion is failure, over jobs that completed, leaving out skippedWe keep cancelled and timed_out apart from failure. In our reading they are a person, a newer run or a limit, not a failing test.

Our own job page keeps the first two apart in the same way: it shows “Waited for a runner” and “Ran for” as two numbers, because they have completely different causes. Its “Ran for” is our clock, which starts when the job’s machine is up and can be longer than the duration GitHub shows for the same job; see watching a job.

How do I get a p50 and a p95?

Subscribe to the workflow_job event, whose actions are queued, in progress, completed and waiting, and write each completed payload to a file or a database. The filter below reads one payload a line and prints the percentiles. We ran it on five made-up payloads, which is a test of the arithmetic and not a measurement of anything: with five jobs the nearest-rank p95 is the slowest one.

def secs: sub("Z$"; "+0000") | strptime("%Y-%m-%dT%H:%M:%S%z") | mktime;
def pct(p): sort | .[((p * length) | ceil) - 1];
[ .[].workflow_job
  | select(.status == "completed" and .conclusion != "skipped")
  | { queue: ((.started_at | secs) - (.created_at | secs)),
      run: ((.completed_at | secs) - (.started_at | secs)),
      conclusion } ] as $jobs
| { jobs: ($jobs | length),
    queue_p50_s: ($jobs | map(.queue) | pct(0.5)),
    queue_p95_s: ($jobs | map(.queue) | pct(0.95)),
    run_p50_s: ($jobs | map(.run) | pct(0.5)),
    run_p95_s: ($jobs | map(.run) | pct(0.95)),
    failed: ($jobs | map(select(.conclusion == "failure")) | length),
    cancelled: ($jobs | map(select(.conclusion == "cancelled")) | length) }
jq -s -c -f metrics.jq jobs.jsonl
# {"jobs":5,"queue_p50_s":15,"queue_p95_s":60,"run_p50_s":210,"run_p95_s":300,"failed":1,"cancelled":1}

It prints counts; divide failed by jobs for the failure rate.

Which tool measures what?

SourceWhat it gives youWhat to know
GitHub's performance metricsAverage run time, average queue time and failure rate, by workflow, job, repository, OS and runner type.Averages, at most 100 days in a custom range, no definition of queue time or failure rate on the page.
Webhooks into the OpenTelemetry Collector's GitHub receiverEach workflow, job and step as a span, from the workflow_job and workflow_run events.The receiver is marked alpha. Its page does not say what its queue span measures, so check one against a job you can see.
Your own table of workflow_job payloadsAny percentile, any range, any grouping you can compute, as in the filter above.You keep and secure the endpoint and the data.
The runner provider's own viewOn ours, each job's wait and run time on its page, and an agent can read a job with get_job.It covers the jobs that ran there, on its own clock.

What should I watch once I have them?

Plot queue time and run time as two lines, since a rise in one means a different thing from a rise in the other. Read a rising queue time against why jobs wait for a runner, a rising run time against how to make GitHub Actions faster, and a rise in cancelled and timed-out jobs against the cancelled-job post and the limits post. To see who is spending the minutes behind the numbers, see which workflows use the most minutes. Build times measured on GitHub’s runner and on ours are on our faster GitHub Actions runners, measured page.

Sources

Frequently asked questions

What CI metrics does GitHub Actions show?

Performance metrics: average run times, average queue times and failure rates, by workflow, job, repository, operating system and runner type. They are under Insights for an organisation, and a custom range spans at most 100 days.

How do I calculate queue time in GitHub Actions?

The usual reading of a workflow_job payload is started_at minus created_at. GitHub lists those fields without describing them, so check the result against a job whose timing you can see on its run page.

How do I get a p95 build time for GitHub Actions?

GitHub's metrics are averages. Subscribe to the workflow_job webhook event, store each completed job, and compute the percentiles from started_at and completed_at in your own code or database.

Can I send GitHub Actions data to OpenTelemetry?

Yes. The OpenTelemetry Collector's GitHub receiver turns workflow_job and workflow_run webhook events into traces, with a span for each workflow, job and step. It is marked alpha, and its page does not say what its queue span measures.

Move your CI onto our runners with one line

Change one line, watch your own build, then decide.

Connect GitHub

Card required. You pay only for the minutes your jobs run.

.github/workflows/ci.yml
jobs: test:removed: runs-on: ubuntu-latestadded: runs-on: runnersio-4vcpu-ubuntu-2604 steps: - uses: actions/checkout@v4 - run: make testadded: build:added: runs-on: runnersio-32vcpu-ubuntu-2604