Skip to content

What metrics does Understand have?

Understand computes a large catalog of metrics for every entity it parses — over 270, including aggregates and per-language variants. Rather than list them all here, this page explains how they're organized and where to find the authoritative, per-metric definitions.

Understand is metric-agnostic

Understand reports the numbers; it does not tell you your code is "good" or "bad", and it does not prescribe pass/fail thresholds. Your team decides what the values mean. See Interpret key metrics for when-to-worry guidance, and HIS metrics / CodeCheck when you need threshold-based gating.

The categories

Understand groups metrics into a few families:

Category Measures Representative IDs
Lines & statements (size / volume) How much code there is CountLine (physical lines), CountLineCode (LOC/SLOC), CountLineComment, CountLineBlank, CountStmt, CountStmtDecl, CountStmtExe
Complexity How tangled the control flow is Cyclomatic (+ Modified/Strict/Essential variants), CountPath, MaxNesting, Knots, RatioCommentToCode
Object-oriented Class design, coupling, cohesion CountClassCoupled (CBO), MaxInheritanceTree (DIT), CountClassDerived (NOC), CountDeclMethodAll (RFC), CountDeclMethod (WMC), PercentLackOfCohesion (LCOM)
Counts (project & architecture) How many of each thing CountDeclFile, CountDeclClass, CountDeclFunction, CountDeclMethod, CountDeclInstanceVariable, CountInput/CountOutput (per-entity fan-in/fan-out — for the per-file kind see coupling & cohesion)

Most base metrics also have aggregate variants that roll a function-level number up to its class, file, or the whole project: Sum…, Avg…, and Max… (for example SumCyclomatic, AvgCyclomatic, MaxCyclomatic).

For the coupling and cohesion metrics in depth — including the fan-in/out plugin metrics — see Measure coupling & cohesion; for using violations and complexity as a debt proxy, see Measure & track technical debt.

Many metrics are hidden by default

As the catalog has grown, several metrics and variants are disabled/hidden out of the box to keep the lists manageable and analysis fast. Turn them on per project in Project → Configure Project, under the Metrics section (or with und settings). See Export & track metrics.

The full catalog

For the complete, always-current list — every metric's API ID, friendly name, calculation, and the languages it applies to — see the metrics catalog. Not every metric applies to every language or entity; the Metrics Browser shows only the metrics valid for whatever you select.

Where metrics show up

Once analyzed, the same numbers surface throughout Understand:

Extending the catalog

You're not limited to the built-ins. Understand ships Python-API metric plugins (Halstead, cognitive complexity, LCOM4, code coverage, Git churn, …), and you can write your own — see Write a metric plugin.