scitools.com

← Metric catalog

Core Percentage is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.

Core Percentage

API ID: CorePercentage
Languages: Any
Targets: Architectures, Project

The percentage of files in the largest cyclic group.

The paper (Baldwin, Carliss, Alan MacCormack, and John Rusnak. "Hidden structure: Using network methods to map system architecture." Research Policy 43.8 (2014): 1381-1397.) presents a way to classify projects based on dependencies. This metric is based on that paper.

Research

Dependency Matrices

Dependencies are first plotted in a matrix with files on the axis. If a file directly or indirectly depends on another file, the value at the matrix is true. The inclusion of indirect dependencies makes the matrix a "Visibility" matrix. The following metrics can be calculated from the matrix:


There are also versions of the above metrics that consider only direct dependencies: Direct Fan In, Direct Fan Out, and Direct Propagation Cost.

Project Classification

The authors found that plotting the Visible Fan In and Visible Fan Out values revealed a pattern.


The "Core" is the largest cyclical group in the project. There are metrics for the number and percentage of files in the core. The Visibility Matrix Cores architecture can be used to find all the cyclical groups in the project.

Most projects were "Core-Periphery" projects with a single core and periphery files. However, not all projects have a clear single core. "Hierarchical" projects have no core and "Multi-Core" projects have more than one. "Multi-Core" and "Hierarchical" projects are split into four groups using median visible fan metrics instead of the core's visible fan metrics. The Visibility Matrix architecture classifies the project and splits the files into the four groups.

See also the Project Quality solution and the blog article Dependency Networks with Understand ↗.