Skip to main content

Module metrics

Module metrics 

Source
Expand description

Metric Engine. Calculators read only the Common IR (design principles P2, P4).

Structs§

FileMetrics
MetricSpec
A metric id and the scopes it is reported at.
ProgramMetrics

Enums§

MetricValue
A metric value, or the reason it has none (ADR-0005). Never conflates “0” with “not computed”.
Scope

Constants§

DEFINITION_VERSION
Version of the metric calculations (design principle P10), recorded in every result. Bump when any calculation changes.

Traits§

Calculator
An independent metric calculator (design principle P4).

Functions§

calculators
compute
Runs every calculator over the program, then adds the derived metrics to every scope (ADR-0015).
specs
Every metric: the standard ones in calculator order, then the derived ones.

Type Aliases§

Metrics
Metric id -> value. Ordered for reproducible output (design principle P10).