Consumption Metric Serializer
Serializes ConsumptionMetric with min / max / avg-per-substage emitted as formatted strings ("N,NNN.NN tokens" / "N,NNN.NN credits") carrying the unit from totalConsumption. The kotlinx default would emit the aggregates as bare Doubles without a unit suffix and without thousand separators.
Properties
Functions
Link copied to clipboard
Parses the JSON object back into a ConsumptionMetric, reading n/a aggregates as null. JSON only.
Link copied to clipboard
Encodes value as a JSON object, emitting aggregates as unit-suffixed formatted strings. JSON only.