Skip to main content

ovecc metrics

Per-component architecture metrics: fan-in/out, coupling, Martin instability I, abstractness A, distance from the main sequence D = |A + I − 1|, aggregate complexity, and churn — plus the repository-wide coupling density. These are the trendable numbers behind diagnose.

Usage: ovecc metrics [OPTIONS]

Example

$ ovecc metrics
Metrics: 6 component(s), coupling density 23.33%

src/core
files 2, fan-in 3, fan-out 0, coupling 3, instability 0.00
abstractness 1.00, distance 0.00, complexity 2, churn 2

src/routes
files 1, fan-in 1, fan-out 2, coupling 3, instability 0.67
abstractness 0.00, distance 0.33, complexity 1, churn 1

src/services
files 2, fan-in 1, fan-out 2, coupling 3, instability 0.67
abstractness 1.00, distance 0.67, complexity 2, churn 2
...

Scope to one component:

$ ovecc metrics --target services
Metrics: 1 component(s), coupling density 35.00%

src/services
files 5, fan-in 2, fan-out 2, coupling 4, instability 0.50
abstractness 1.00, distance 0.50, complexity 42, churn 10

Reading the numbers

MetricMeaningHealthy direction
fan-inComponents that depend on this onehigh = responsibility; protect it
fan-outComponents this one depends onlower = more self-contained
instability Ifan-out / (fan-in + fan-out)stable (≈0) for foundations, unstable (≈1) for leaves
abstractness AShare of abstract/type-only surfaceshould rise with fan-in
distance D|A + I − 1| — distance from the "main sequence"near 0; near 1 is the zone of pain (rigid + concrete) or zone of uselessness
complexityAggregate cognitive complexity of the componentlower
churnCommits touching the componentcontext for the rest

Options

OptionEffect
--target <substr>Scope to a single file or module

Plus the global options.