Skip to main content

Module metrics

Module metrics 

Source

Modules§

calibration
Calibration parameter tables for decision models (System One P0.3/P2.2).
decision_batch
Arrow-native decision-batch storage (System One P0.3).
producer
Producer-side write API for schema-v2 metric rows.

Structs§

MetricRecord
A single metric record with running window calculations.

Constants§

METRICS_SCHEMA_VERSION
Version of the metrics table schema emitted by get_metrics_schema. v1: five running-window columns; v2: adds labels and tenant_id.
METRICS_TABLE
Primary metrics table name.

Functions§

create_record_batch
Creates a RecordBatch from a vector of MetricRecords.
create_schema_v2_tables
Creates all schema-v2 tables and migrates pre-v2 metrics tables in place.
decode_labels
Parse the JSON storage form of a label map.
encode_labels
Serialize labels to their canonical storage form: a JSON object with sorted keys. Empty label sets map to None (SQL NULL on write).
encode_record_batch
Encodes a RecordBatch into a vector of MetricRecords.
get_metrics_schema
Gets the schema for metric records in Arrow format (schema v2).