Toolvito

Works on this device

CI Duration Calculator

A CI pipeline is the set of build, test and deploy jobs that run each time code changes. Type your jobs and their run times. You get the time from start to end, the critical path that sets that time, the runner time of all jobs, and the minutes you are billed under the rule you choose.

Enter your values

Each stage starts when the stage before it has ended, and its jobs run side by side (as in GitLab CI stages). You get the time of the whole pipeline and the billed minutes.

Your values

Optional. Leave blank when there are always enough runners.

Getting the runner ready and fetching the code. It uses the runner and is billed.

Optional. Your own price, in your currency. The example is for trying the tool; it is not a price of any provider.

Jobs

Run time: how long the job runs once it has started, without the wait and the start-up.

This unit is used in every row.

More options

Queue time until a runner picks the job up. It does not use a runner and is not billed.

Use the rule of your provider. As an example, GitHub Actions says it rounds each job up to the whole minute; check its current terms.

Some providers count a minute on some runners as more than one minute. Type 1 if yours does not.

Optional. For the minutes and the cost of a month.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

How to use this calculator

  1. Choose how your jobs are arranged: Stages that run one after another, or Jobs that wait for other jobs (needs).
  2. Type one row for each job: its stage or the jobs it needs, and how long it runs.
  3. Type the start-up time of a job. Under More options, type a queue time, a runner limit and how your provider bills minutes.
  4. Choose Calculate. To see a month, type the pipeline runs per month and, if you want a cost, your price per minute.

How the time is worked out

  • Each job takes: wait (queue time, no runner), start-up and run time (both on a runner).
  • Stages: a stage starts when the stage before it has ended. Its jobs run side by side; with a runner limit, each job takes the runner that is free first, in the order of your list. Pipeline time = the sum of the stage times.
  • Needs: a job starts as soon as all the jobs it needs have ended. Pipeline time = the latest end of any job. The critical path is the chain of jobs with no slack; slack = how much later a job could start without making the pipeline longer.
  • Runner time = start-up + run time of every job, added up. Billed minutes = runner time with your rounding rule (each job rounded up, the whole run rounded up, or exact), times a minute multiplier. Per month: billed minutes per run × runs − minutes included.

Worked example

Stages: build (compile, 6 min), test (unit tests 8 min, lint 2 min, integration tests 12 min) and deploy (3 min), each job with 20 s of start-up. Build ends at 6:20; test ends 12:20 later, when integration tests end, at 18:40; deploy ends at 22:00. The critical path is compile → integration tests → deploy. Runner time is 32 min 40 s. With each job rounded up to a whole minute (7 + 9 + 3 + 13 + 4) you are billed 36 minutes.

With only 2 runners, lint and then integration tests share one runner, so integration tests waits 2 min 20 s and the pipeline takes 24 min 20 s.

Needs: when deploy needs unit tests, lint and integration tests, and the tests need compile, the pipeline also takes 22:00. Lint has 16 min 20 s of slack and unit tests 4 min.

Limits you should know

  • The order and the runner a CI service picks can differ from the simple rule here, and run times change from run to run. Use typical or measured times.
  • The needs mode counts enough runners for every job that can run. With fewer runners, jobs wait longer.
  • Billing rules, multipliers, prices and included minutes are yours to type. The examples are for trying the tool and are not the terms of any provider.
  • Caches, artifacts and storage are not counted.

Related tools