Deep dive into Metrics and Trends for builds

Last updated on May 28 2022
Uma Kulkarni

Table of Contents

Deep dive into Metrics and Trends for builds

Jenkins – Metrics & Trends

There are various plugins which are available in Jenkins to showcase metrics for builds which are carried out over a period of time. These metrics are useful to understand your builds and how frequently they fail/pass over time. As an example, let’s look at the ‘Build History Metrics plugin’.

This plugin calculates the subsequent metrics for all of the builds once installed

• Mean Time To Failure (MTTF)
• Mean Time To Recovery (MTTR)
• Standard Deviation of Build Times

Step 1 − Go to the Jenkins dashboard and click on Manage Jenkins

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

Step 2 − Go to the Manage Plugins option.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

Step 3 − Go to the Available tab and search for the plugin ‘Build History Metrics plugin’ and choose to ‘install without restart’.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

Step 4 − The subsequent screen shows up to confirm successful installation of the plugin. Restart the Jenkins instance.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

When you go to your Job page, you’ll see a table with the calculated metrics. Metric’s are shown for the last 7 days, last 30 days and all time.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

To see overall trends in Jenkins, there are plugins available to gather information from withwithin the builds and Jenkins and display them in a graphical format. One example of such a plugin is the ‘Hudson global-build-stats plugin’. So let’s go through the steps for this.

Step 1 − Go to the Jenkins dashboard and click on Manage Jenkins

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

Step 2 − Go to the Manage Plugins option

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

Step 3 − Go to the Available tab and search for the plugin ‘Hudson global-build-stats plugin’ and choose to ‘install without restart’.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

Step 4 − The subsequent screen shows up to confirm successful installation of the plugin. Restart the Jenkins instance.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

To see the Global statistics, please follow the Step 5 through 8.

Step 5 − Go to the Jenkins dashboard and click on Manage Jenkins. Within the Manage Jenkins screen, scroll down and now you’ll now see an option called ‘Global Build Stats’. Click on this link.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

Step 6 − Click on the button ‘Initialize stats’. What this does is that it gather’s all the existing records for builds which have already been carried out and charts can be created based on these results.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

Step 7 − Once the data has been initialized, it’s time to create a new chart. Click on the ‘Create new chart’ link.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

Step 8 − A pop-up will come to enter relevant information for the new chart details. Enter the subsequent mandatory information

• Title – Any title information, for this example is given as ‘Demo’
• Chart Width – 800
• Chart Height – 600
• Chart time scale – Daily
• Chart time length – 30 days

The rest of the information can remain as it is. Once the information is entered, click on Create New chart.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

You’ll now see the chart which displays the trends of the builds over time.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

If you click on any section withwithin the chart, it will give you a drill down of the details of the job and their builds.

Deep dive into Metrics and Trends for builds
Deep dive into Metrics and Trends for builds

So, this brings us to the end of blog. This Tecklearn ‘Deep dive into Metrics and Trends for builds’ blog helps you with commonly asked questions if you are looking out for a job in DevOps. If you wish to learn Jenkins and build a career in DevOps domain, then check out our interactive, Continuous Integration with Jenkins Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

Continuous Integration with Jenkins

Continuous Integration with Jenkins Training

About the Course

Tecklearn has specially designed this Continuous Integration with Jenkins Training Course to advance your skills for a successful career in this domain. This course helps you learn server automation, continuous integration, build and configuration tools, Jenkins master-slave architecture, different types of plugins, implementing automated testing and more through hands-on projects and exercises. Upon completion of this online training, you will hold a solid understanding and hands-on experience with Jenkins.

Why Should you take Continuous Integration with Jenkins Training?

• Average salary of Jenkins Professional is $110k (Indeed.com Salary Data)
• Jenkins is an open-source automation server which enables developers around the world to reliably build, test, and deploy their software.

What you will Learn in this Course?

Introduction to DevOps

• What is Software Development
• Software Development Life Cycle
• Why DevOps?
• What is DevOps?
• DevOps Lifecycle
• DevOps Tools
• Benefits of DevOps
• How DevOps is related to Agile Delivery
• DevOps Implementation

Continuous Integration with Jenkins

• Introduction to Continuous Integration and Jenkins
• Jenkins Management
• Jenkins Master Slave Architecture
• Tools Required for CI
• Understanding CI/CD Pipelines
• Creating an end-to-end automated CI/CD Pipeline
• Jenkins Versions

0 responses on "Deep dive into Metrics and Trends for builds"

Leave a Message

Your email address will not be published. Required fields are marked *