25.7. Commit

25.7.1. Overview

The Commit sensor data type is designed for representation of the occurrence of one commit of a file to a configuration management repository. Table 25.7, “Commit SDT attributes” documents its attributes.

Table 25.7. Commit SDT attributes

AttributeDescription
tstampThe UTC time at which this data was collected.
toolA string indicating the tool that collected this data, such as "SVN".
commitTimeThe time at which this commit occurred, as a UTC long.
fileThe name of the file that was committed.
authorThe configuration management account name that committed this file.
versionThe version number assigned to this commit.

In addition to the above required fields for all Commit data, there are a number of "optional but common" attributes that can appear on the property map. These are documented in Table 25.8, “Commit SDT "optional but common" properties” so that sensor writers can produce Commit sensor data that can be processed by the built-in analyses and reduction functions.

Table 25.8. Commit SDT "optional but common" properties

PropertyDescription
repositoryThe name of the repository where this file was committed.
branchThe branch that this file was committed to.
totalLinesThe total number of lines in this file.
linesAddedThe number of lines added from this file since the last commit.
linesDeletedThe number of lines deleted from this file since the last commit.
logThe log message associated with this commit.

25.7.2. Applications of the Commit SDT

The CVS configuration management tool supports commiting of files. A sensor for CVS represents this data as Commit entries.

Once collected, Commit data can be used to track trends in file commits and calculation of "churn", the total number of lines of code added and/or deleted over time. This can help identify areas of the system where evolution is occuring. Commit data can be combined with other product/process measures to investigate issues such as code decay, i.e. the tendency of code to become more defect prone with more changes to it.