Code Changes Commits
Question: How many changes were made to the source code during a specified period?
Keywords: change request, code changes, pull requests, merged, merging, source code
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 commits are a proxy for the activity in a project. By counting the code changes commits 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.
Implementation
Potential aggregators include:
- Count. Total number of changes during the period.
Potential parameters include:
- Period of time. Start and finish date of the period. Default: forever. Period during which changes are considered.
- Criteria for source code. Algorithm. Default: all files are source code. If focused on source code, criteria for deciding whether a file is a part of the source code or not.
Filters
- By actors (author, committer). Requires actor merging (merging ids corresponding to the same author).
- By groups of actors (employer, gender...). Requires actor grouping, and likely, actor merging.
- By tags (used in the message of the commits). Requires a structure for the message of commits. This tag can be used in an open-source project to communicate to every contributors if the commit is, for example, a fix for a bug or an improvement of a feature.
- Count per month over time
- Count per group over time
Tools Providing the Metric
-
GrimoireLab provides this metric out of the box.
- View an example on the CHAOSS instance of Bitergia Analytics.
- Download and import a ready-to-go dashboard containing examples for this metric visualization from the GrimoireLab Sigils panel collection.
- Example screenshot:

-
Augur provides this metric both as Code Changes Commits and as Code Changes Lines. Both metrics are available in both the
repoand therepo_groupmetric forms - more on that in the Augur documentation. - Gitdm
Data Collection Strategies
Specific description: Git
Mandatory parameters (for Git):
-
Date type. Either author date or committer date. Default: author date. For each git commit, two dates are kept: when the commit was authored, and when it was committed to the repository. For deciding on the period, one of them has to be selected.
-
Include merge commits. Boolean. Default: True. Merge commits are those which merge a branch, and in some cases are not considered as reflecting a coding activity.
- Include empty commits. Boolean. Default: True. Empty commits are those which do not touch files, and in some cases are not considered as reflecting a coding activity.