Skip to content
Arxo Arxo

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.

  • 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.
  1. Data — Arxo builds import, call, and optionally entity graphs, using your grouping and exclusions.
  2. Computation — Selected metrics run (via preset or explicit metrics list). Each plugin reads the graphs and optional config, then outputs a MetricResult with values (and optionally findings with evidence).
  3. Output — Results are aggregated, evaluated against policy, and reported. Violations are reported when invariants fail.

Each metric produces:

  • id — Plugin identifier (e.g. scc, propagation_cost).
  • version — Metric version for compatibility.
  • data — List of metric entries (key + typed value) for numeric and structured outputs.
  • findings (optional) — Findings with evidence (file, line, snippet) for drill-down.
ConceptDescription
Metric pluginCode that computes one or more numeric values from graphs.
Metric keyName of a single value (e.g. scc.max_cycle_size, centrality.module.hub_like_count).
InvariantPolicy rule that compares a metric key to a threshold (==, <=, >=, etc.).
  • Metrics Overview — All metric categories and quick reference
  • Configuration — Enabling metrics and setting thresholds
  • Presets — Pre-defined metric sets (quick, ci, risk, full)