CustomMetric

data class CustomMetric(val providerId: String, val displayName: String, val description: String = "", val unit: String = "", val systemValue: Double? = null, val moduleValues: Map<String, Double> = emptyMap())(source)

One metric contributed by a third-party MetricProvider (the metrics extension point of the Aalekh SPI). A metric can be system-wide (systemValue), per-module (moduleValues), or both - a provider populates whichever dimensions make sense for it.

This is the serialized, machine-readable shape written to aalekh-custom-metrics.json; the provider interface (com.aalekh.aalekh.analysis.spi.MetricProvider) produces the raw values and the engine assembles them into this envelope.

Parameters

providerId

Stable identifier of the contributing provider (its id). Used as the column key and must be unique across loaded providers - a duplicate is dropped.

displayName

Human-readable label for reports and the KPI panel.

description

Optional one-line explanation of what the metric measures.

unit

Optional unit label (e.g. "%", "edges"); empty for a bare number.

systemValue

The single whole-graph value, or null if the metric is per-module only.

moduleValues

Per-module values keyed by module Gradle path; empty if the metric is system-only.

Constructors

Link copied to clipboard
constructor(providerId: String, displayName: String, description: String = "", unit: String = "", systemValue: Double? = null, moduleValues: Map<String, Double> = emptyMap())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard