Skip to content

Weekly

Find the jobs that got slower this week

Each week you see which jobs in a workflow got slower or less reliable compared with the week before.

Runs
Weekly
Apps
CircleCI
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: every Monday, email me the 5 slowest and 5 least reliable jobs in my build-and-test workflow, and how each changed from last week.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A pipeline rarely gets slow all at once. One job adds a heavier test suite, another picks up a larger Docker image, and over a quarter the same workflow goes from comfortable to painful. Because every individual run looks only slightly slower than the one before, no one raises a ticket.

Each week, this pulls CircleCI's job metrics for the workflow, compares them with the numbers it saved the week before, and emails you the jobs with the biggest changes, whether they slowed down or fail most often. The comparison with last week is what makes it useful, since it shows movement rather than a static ranking.

Platform and developer-experience engineers tend to use it as their weekly input for deciding which pipeline problem to fix next. The comparison with stored numbers is what separates this from a plain ranking, since a job that has always been slow is less urgent than one that suddenly got slower.

What you get out of it

  • Find the job that quietly got worse

    A saved comparison reveals a job that took 6 minutes last week and 9 this week. Spotting that jump within days tells you which commit to look at, rather than guessing months later.

  • Prioritize pipeline work with evidence

    Engineering time for CI is scarce. A ranked list of biggest regressions shows where the next hour of effort recovers the most developer waiting time across the team. A ranking of the largest changes points to the biggest wins first, so a short sprint of CI work delivers visible results.

  • Reduce spend on compute

    Longer jobs consume more credits. Catching a runaway job early can shave real money off the CircleCI bill before it becomes a line item that finance asks about. Teams often discover that one or two jobs consume most of the compute, which makes the first optimization an easy decision.

  • Learn which jobs fail most

    The list includes jobs that fail frequently, not just slow ones. A job that fails one run in five costs reruns and trust, and it deserves a named owner. Trust in the pipeline recovers quickly once the worst offenders are fixed, because developers stop expecting long waits and reruns.

  • Keep a history of pipeline performance

    Because last week's numbers are stored for each run, you gradually build a week-by-week record. It shows whether an optimization project really worked or the gain faded. The same record settles later debates about whether an optimization actually stuck or the gain slowly faded away.

How it works

What happens, step by step

  1. Once a week, ClickRuntime pulls the run times and success rates for each job in your chosen CircleCI workflow.

  2. It compares them with the figures it saved the week before.

  3. You get an email showing the slowest jobs and the biggest changes, like "e2e-tests: 14.2 min (was 12.8 min)". This week's numbers are saved for next time.

Before it runs live

  • Connect CircleCI

What you get

RunsWeekly
Find the jobs that got slower this weektoday, 9:00Succeeded
Email · Slowest jobsSlowest (p95): e2e-tests: 14.2 min (was 12.8 min) docker-build: 6.1 min (was 6.4 min)

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other CircleCI steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
get_a_weekly_report_of_the_slowest_jobs.pyexample
from clickruntime import on_trigger, credentials, http, notify, state

PROJECT, WORKFLOW = "gh/acme/web-app", "build-and-test"

@on_trigger
def run(event):
    resp = http.get(f"https://circleci.com/api/v2/insights/{PROJECT}/workflows/{WORKFLOW}/jobs",
                    params={"reporting-window": "last-7-days"},
                    headers={"Circle-Token": credentials.secret("CIRCLECI_TOKEN")})
    resp.raise_for_status()
    jobs = {j["name"]: {"p95": j["metrics"]["duration_metrics"]["p95"], "ok": j["metrics"]["success_rate"]}
            for j in resp.json()["items"]}
    last = state.get("last_week") or {}

    def line(name, key, fmt):
        prev = last.get(name, {}).get(key)
        change = f" (was {fmt(prev)})" if prev is not None else ""
        return f"  {name}: {fmt(jobs[name][key])}{change}"

    slow = sorted(jobs, key=lambda n: -jobs[n]["p95"])[:5]
    flaky = sorted(jobs, key=lambda n: jobs[n]["ok"])[:5]
    text = ("Slowest (p95):\n" + "\n".join(line(n, "p95", lambda s: f"{s / 60:.1f} min") for n in slow) +
            "\n\nLeast reliable:\n" + "\n".join(line(n, "ok", lambda r: f"{r * 100:.0f}%") for n in flaky))
    notify.email_me(f"{WORKFLOW}: slowest and least reliable jobs", text)
    state.set("last_week", jobs)
    return {"jobs": len(jobs)}

FAQ

Common questions

How does it know what changed since last week?
It stores the job metrics from each run and compares the new figures against the previous ones. The first run has nothing to compare with, so it reports the current values and begins tracking from there. Its first email becomes the starting reference, and every later weekly email is compared with the one before it.
Can it show only jobs slower than a certain amount?
Yes. You can ask for only jobs that slowed by more than, say, 20% or 2 minutes to be included. Your AI assistant shows the revised comparison step for approval before it replaces the current one. Small differences are left out so the list stays short enough to read in a minute and act on the same day.
Will the numbers include queued time?
The report uses the duration metrics CircleCI provides for each job. Waiting time in the queue is treated separately by CircleCI, so check the metric definitions there if queueing is your main concern. Time spent waiting in a queue is not part of this report, so look at CircleCI's own queue metrics if you suspect that problem.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (weekly). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Find the jobs that got slower this week” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.