MetricDefinition

constructor(id: String, name: String, unit: String, formula: String, question: String, interpretation: String, action: String, bands: MetricBands?, provenance: Provenance, perModule: Boolean)(source)

Parameters

id

Stable kebab-case identifier, used as a column key and in exports.

name

Display name.

unit

Unit label ("modules", "%", "" for a bare number).

formula

How it is calculated, in one line.

question

The engineering question it answers.

interpretation

How to read the number.

action

What a bad value suggests doing.

bands

Thresholds, or null when the metric is descriptive and has no good or bad value.

provenance

Whether the metric is observed from the build or computed from the graph.

perModule

True when the metric is per-module; false when it describes the whole project.