StatSchema
Declarative, typed schema for a group of stats, layered on top of com.eignex.skema.Schema<StatSpec> so the entries map is wire-serializable.
Subclass and declare stats via the series, paired, vector, discrete, and group delegates; each property exposes a StatKey for typed retrieval from a GroupResult. Every entry is a StatSpec, which means the schema always round-trips through the wire - no live-stat back-door.
If you need an aggregation that isn't wire-expressible (e.g. a filter-wrapped stat), build a StatGroup / *ListStats directly with the vararg Pair constructor - bypass the schema layer entirely.
A schema describes stats and nothing else. com.eignex.kumulant.core.Concurrency is a deployment choice, so it is supplied where the stats are built - the StatGroup / *ListStats constructor - and applies to the whole tree, nested groups included. One schema can therefore back a sharded worker and its coordinator at different levels.
Samples
val telemetry = object : StatSchema() {
val latencyMean by series(Mean)
val errorRate by series(Rate)
}
val group = StatGroup(telemetry, concurrency = Concurrency.Strict)
group.update(42.0)
val results = group.read()
println(results[telemetry.latencyMean].mean)Constructors
StatSchema
Functions
statSchemaDef
Pure-data, serializable view of this schema using kumulant's wire field stats.