Metrics
Metrics
Section titled “Metrics”Metrics are numeric values computed from your codebase that describe structural, coupling, and health properties. Arxo runs metric plugins over graphs and produces results you can track over time and enforce with policies.
What Metrics Are
Section titled “What Metrics Are”- Computed values — Each metric plugin produces a set of key–value pairs (e.g.
scc.max_cycle_size,propagation_cost.system.ratio). - Categories — Metrics are grouped into structure & organization, dependencies & coupling, change history, code health, and insights & actions.
- Enforceable — You define policy invariants (e.g.
scc.max_cycle_size == 0) that must hold for the run to pass.
How They Work
Section titled “How They Work”- Data — Arxo builds import, call, and optionally entity graphs, using your grouping and exclusions.
- Computation — Selected metrics run (via preset or explicit
metricslist). Each plugin reads the graphs and optional config, then outputs aMetricResultwithvalues(and optionally findings with evidence). - Output — Results are aggregated, evaluated against policy, and reported. Violations are reported when invariants fail.
Metric Result Shape
Section titled “Metric Result Shape”Each metric produces:
id— Plugin identifier (e.g.scc,propagation_cost).version— Metric version for compatibility.data— List of metric entries (key+ typedvalue) for numeric and structured outputs.findings(optional) — Findings with evidence (file, line, snippet) for drill-down.
Quick Reference
Section titled “Quick Reference”| Concept | Description |
|---|---|
| Metric plugin | Code that computes one or more numeric values from graphs. |
| Metric key | Name of a single value (e.g. scc.max_cycle_size, centrality.module.hub_like_count). |
| Invariant | Policy rule that compares a metric key to a threshold (==, <=, >=, etc.). |
Learn More
Section titled “Learn More”- Metrics Overview — All metric categories and quick reference
- Configuration — Enabling metrics and setting thresholds
- Presets — Pre-defined metric sets (quick, ci, risk, full)