MetricSnapshot

data class MetricSnapshot(val cycleCount: Int = 0, val godModuleCount: Int = 0, val ccd: Long = 0, val tanglePercent: Double = 0.0, val averageInstability: Double = 0.0, val criticalPathLength: Int = 0)(source)

A snapshot of the structural metrics that quality gates ratchet on.

Recorded in the committed baseline (aalekh-baseline.json) by aalekhBaseline and compared against the current graph by aalekhCheck. For every metric here, higher is worse, so a gate fails when the current value exceeds the baseline.

All fields default so a baseline written by an older plugin version (without a metrics block) still deserializes - a missing snapshot simply disables the gates until the baseline is regenerated.

Parameters

cycleCount

Number of main-code dependency cycles.

godModuleCount

Number of god modules (high fan-in and high fan-out).

ccd

Cumulative Component Dependency - the headline coupling number.

tanglePercent

Percentage of modules inside a dependency cycle.

averageInstability

Mean instability across all modules.

criticalPathLength

Longest production dependency chain, in modules.

Constructors

Link copied to clipboard
constructor(cycleCount: Int = 0, godModuleCount: Int = 0, ccd: Long = 0, tanglePercent: Double = 0.0, averageInstability: Double = 0.0, criticalPathLength: Int = 0)

Properties

Link copied to clipboard
Link copied to clipboard
val ccd: Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard