scitools.com

← Metric catalog

Percent of Root Entities 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 Root Entities

API ID: PercentOfRootEntities
Languages: Any
Targets: Architectures

Percentage of the root architecture's entities (recursive) that belong to this architecture.

The root is the top-level architecture (no parent). Both counts use recursive entity membership, so the denominator is the same for every node in the tree and you can compare any two nodes. The root itself returns 100. Returns null if the root has no entities.