Recipe: Code Changes (CHAOSS Metric)

Hi everyone,

This recipe aims to show how you can get the CHAOSS metric Code Changes in Cauldron. This is up to date to CHAOSS metric release 202001.

The following is an excerpt from the CHAOSS metric definition:

Code Changes

Question: How many changes were made to the source code during a specified period?

Description

These are changes to the source code during a certain period. For “change” we consider what developers consider an atomic change to their code. In other words, a change is some change to the source code which usually is accepted and merged as a whole, and if needed, reverted as a whole too. For example, in the case of git, each “change” corresponds to a “commit”, or, to be more precise, “code change” corresponds to the part of a commit which touches files considered as source code.

Objectives

Volume of coding activity. Code changes are a proxy for the activity in a project. By counting the code changes in the set of repositories corresponding to a project, you can have an idea of the overall coding activity in that project. Of course, this metric is not the only one that should be used to track volume of coding activity.

Recipe Steps:

Before you start, make sure you switched to the private tenant where you have write permission and have permission to create visualizations. If you have not prepared your private workspace, do so before continuing.

Step 1: Create a new visualization of type Metric

Step 2: Select the Index

  1. (optional) Search for: git
  2. Click on: git_enrich

Step 3: Configure metric:

  1. Aggregation: Unique Count
  2. Field: hash
  3. Custom label: Number of Commits
  4. Execute changes

That’s it, now you just need to save the metric if you want to use it in a dashboard.