The previous tutorial explained Build History Metrics in Jenkins. This tutorial explains the trend-related plugin in Jenkins.
How to install the trends-related plugin in Jenkins?
To see overall trends in Jenkins, there are plugins available to gather information from within the builds and Jenkins and display them in a graphical format. One example of such a plugin is the ‘global-build-stats plugin’. So let’s go through the steps for this.
To know more about global build stats, please refer to this documentation.
Pre-Requisite:
Jenkins installed and started on the computer
Implementation Steps
Step 1: Start the Jenkins server and open the browser and navigate to the localhost and the port in which Jenkins is running
Step 2: Log in to Jenkins UI
Provide a username and password and click on the Sign-in Button.
Step 3: Go to Manage Plugins
Click on the Manage Jenkins. Choose Manage Plugins.

Step 4: Add the global-build-stats plugin
On the Plugins Page, go to the Available option.
- Select the “global-build-stats” Plugin
- Click on “Install without restart”. The plugin will take a few moments to finish downloading depending on your internet connection, and will be installed automatically.
- You can also select the option “Download now and Install after the restart” button. In which plugin is installed after the restart
- You will be shown a “No updates available” message if you already have the TestNG Report plugin installed.

Click on the checkbox “Restart Jenkins when installation is complete when no jobs are running“.
Step 5: Verify the global-build-stats plugin
For verification of the successful installation of the plugin, we can go to the “installed” tab, and we can see the presence of the build history metrics plugin.

Step 6 − Generate Global Build Stats metrics
Go to the Jenkins dashboard and click on Manage Jenkins. In the Manage Jenkins screen, scroll down, and now you will now see an option called “Global Build Stats“. Click on this link.

Click on the button “Initialize stats“. What this does is that it gathers all the existing records for builds that have already been carried out, and charts can be created based on these results.

Once the data has been initialized, it’s time to create a new chart. Click on the “Create new chart” link.

A pop-up will come to enter the relevant information for the new chart details. Enter the following 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.

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

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

Congratulations on making it through this tutorial and hope you found it useful! Happy Learning!! Cheers!!