Skip to main content

Metrics

ovecc records 28 metrics at every ovecc index, per snapshot. Any of them can be trended with ovecc history <metric> and compared with ovecc drift. The same definitions are served machine-readably by ovecc capabilities --format json and inside every JSON envelope's meta block.

Structure

MetricDefinitionInterpretation
filesNumber of indexed source filesstructural size
modulesNumber of inferred or declared modulesstructural size
dependenciesNumber of resolved import dependenciesstructural size
external_dependenciesDependencies resolving outside the repositoryinformational
symbolsExtracted top-level symbols (functions, classes, …)structural size
callsResolved call-graph edgesinformational
apisExposed routes, RPC methods, and handlersinformational
tablesDatabase schema objects referenced by codeinformational
functionsFunctions/methods analyzed for complexityinformational
parse_failuresFiles that failed to parse this runlower is better

Coupling & architecture

MetricDefinitionInterpretation
coupling_densityRealized module edges over all possible directed edges. Range [0, 1]lower is looser coupling
circular_dependenciesStrongly-connected (cyclic) module components, over runtime imports onlyimport type is erased before load and never witnesses a cyclelower is better
boundary_violationsFindings crossing a declared architecture boundarylower is better
circular_dependencies vs query cycles

One strongly-connected component can hold several elementary loops, so this metric sits at or below the loop count query cycles lists. They are not meant to match.

Complexity

MetricDefinitionInterpretation
max_cyclomaticHighest per-function McCabe cyclomatic complexitylower is better
max_cognitiveHighest per-function SonarSource cognitive complexitylower is better
total_cognitiveSum of cognitive complexity across functionslower is better
high_complexity_functionsFunctions over the complexity thresholdslower is better

Findings & hygiene

MetricDefinitionInterpretation
security_findingsCode security findings: secrets, insecure patterns, weak crypto, tainted flows. Dependency advisories are tracked separatelylower is better
dependency_advisoriesKnown vulnerabilities (OSV) in dependencies; depends on when advisories were last fetchedlower is better
unused_exportsExports imported by no reachable modulelower is better
unused_filesFiles reachable from no entry pointlower is better
unlisted_dependenciesPhantom dependencies: imported but undeclaredlower is better
deadcode_entry_pointsEntry points the reachability analysis started fromcontext for unused_files
code_smellsStructural code-smell findings: feature envy, large classes, data clumpslower is better
stale_suppressionsovecc-ignore comments that suppress no findinglower is better

Evolution (requires Git history)

MetricDefinitionInterpretation
commits_ingestedGit commits ingested this run; 0 means no Git history0 disables churn/ownership signals
max_file_churnHighest per-file commit countcontext
ownership_fragmented_filesFiles with fragmented ownershiplower coordination cost

Per-component metrics

ovecc metrics additionally reports Martin metrics per component (not snapshot-trended, computed from the graph): fan-in, fan-out, coupling, instability I = fan-out / (fan-in + fan-out), abstractness A, and distance from the main sequence D = |A + I − 1|.

Not metrics

Two signals are deliberately not folded into any score:

  • A module's bug-fix history sits beside the hotspots ranking rather than inside it. What a correction says about a module is a judgment call, so the number is there to be argued with, not to hand down a verdict.
  • Line coverage (when an LCOV tracefile was indexed) sits on the same row for the same reason. Its value is the crossing: churn alone ranks the code that keeps moving, coverage alone ranks the code nobody tests, and only together do they say where a change is most likely to break something no test would catch.