ModuleGraphMetrics

constructor(path: String, fanIn: Int, fanOut: Int, instability: Double, transitiveDependencies: Int, blastRadius: Int, blastRadiusPercent: Double, influence: Double, betweenness: Double, depthFromEntry: Int, apiSurfaceRatio: Double, isArticulationPoint: Boolean, isEntryPoint: Boolean, isFoundation: Boolean)(source)

Parameters

path

Module Gradle path.

fanIn

Modules that directly depend on this one.

fanOut

Modules this one directly depends on.

instability

fanOut / (fanIn + fanOut) - 0 stable, 1 unstable.

transitiveDependencies

Modules reachable by following dependencies. Also the module's comprehension cost: how much of the project you must hold in your head to understand it.

blastRadius

Modules that transitively depend on this one - what a breaking change here forces to rebuild, retest, and review.

blastRadiusPercent

blastRadius as a share of the project, in [0, 100].

influence

PageRank over the dependency graph, normalised so the mean module scores 1.0. Unlike raw fan-in it weighs who depends on you: being depended on by the app matters more than being depended on by a leaf.

betweenness

Share of shortest dependency paths that run through this module, in [0, 1]. High betweenness marks a choke point - a module most of the project's structure routes through.

depthFromEntry

Shortest hop count from the nearest entry point, or -1 when unreachable from any of them. The natural reading order for someone new to the codebase.

apiSurfaceRatio

Share of this module's outgoing production edges declared api, in [0, 1] - how much of what it depends on it re-exports onto its own consumers.

isArticulationPoint

True when removing this module would split the project into disconnected pieces. A structural bottleneck rather than merely a busy one.

isEntryPoint

True when nothing depends on this module - a place execution starts.

isFoundation

True when this module depends on nothing - the bottom of the graph.