Percent of Files in Largest Connected Group 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.
Percent of Files in Largest Connected Group
API ID: PercentFilesInLargestGroupLanguages: Any
Targets: Architectures, Project
The percentage of files in the largest group of files connected by dependencies.
A connected file group is a set of files linked by dependencies in either direction: a file belongs to a group if it depends on a file in the group or a file in the group depends on it. No dependencies cross between groups. In graph terms, the groups are the weakly connected components of the file dependency graph. Each file with no dependencies to or from other files is a group by itself.
For an architecture, only dependencies between files inside the architecture count.
To see the groups, use the Connected File Groups architecture.
A value of 100 means every file is connected to the rest. Low values mean the project or architecture is made of independent parts, so dependency-based metrics describe several separate systems at once.
For example, consider a project with three files where A depends on B and C has no dependencies.
There are 2 disconnected file groups: A and B, and C by itself. The largest group has 2 of the 3 files, so the percent of files in the largest connected group is 66.7.