Red Pipeline Time

Purpose

Red Pipeline Time shows a percentage of time pipelines stay failed.

How metric helps

Red Pipeline Time %  helps to reveal an overall efficiency of an integration process and to highlight the most problematic entities (branches).

How it works

Chart overview

Chart shows Red Pipeline Time % in % - Axis Y by calendar week - Axis X. The number of series in the chart is a number of selected branches in Project Configuration for a Git Lab CI data source. Legend shows the last values of the metric by branch.

When hover over a series hint appears:

  • <Branch name>: <metric value in %>

  • <Red Pipeline Time>: <value in min>

Next to the chart name there is a link to GITLab CI repository ('arrow').



Calculation formula

The algorithm of finding a red pipeline:

Step 1 - PERF searches for a red pipeline.

Step 2 - When finds it, PERF checks if the next pipeline is green:

  • if green - PERF calculates Red Pipeline Time segment

  • if red  - PERF keeps searching the red status switched to green so that this red status becomes the first in the row of red statuses before the green one.

Red Pipeline Time segment calculation:



Pipeline N-1 

Pipeline N

Green

Red

Green

0

Green start time- Red start time

Red

0

0

if N-1 prior to Red is also Red then go till the last Red on the way

Red Pipeline Time % = ∑Red Pipeline Time segment/Time overall

Time overall = calendar week time in hours (24*7 hours)

Assumptions:

  • Only successful and failed pipelines are considered here, i.e. pipelines in queued or "in progress" states are ignored.

  • If a pipeline end timestamp is later than a week end then pipeline end timestamp is a week end timestamp.

  • If a pipeline start timestamp is earlier than a week start then pipeline start timestamp is a week start timestamp.

RAG thresholds: n/a.

Calculation is illustrated in the picture below: 

 

  1. “Virtual” points on Start and End points of an iteration – taken as last known status of pipeline execution out of the iteration horizon (if available)

  2. RED segments: from a commit which broke a pipeline till a commit which fixed it (take START time points of pipeline executions)

 

Edge cases are shown in the picture below:


Data Source

Data for the metric can be collected from GitLab CI or Jenkins. When using Jenkins make sure Pipeline plugin is installed.

Related pages