inference_metrics


Description

{“what”:“Aggregated inference performance metrics per provider/model over fixed time windows.”,“why”:“Provides a queryable history of latency, throughput, and success to detect regressions and capacity issues.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.772105857+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id serial 10 √ nextval('inference_metrics_id_seq'::regclass)

{“what”:“Surrogate primary key for each metric row.”,“why”:“Uniquely identifies a row for updates and joins.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.785467993+00:00”}

provider_id text 2147483647 null

{“what”:“Identifier of the inference provider (e.g., ‘openai’).”,“why”:“Groups metrics by provider to compare performance across vendors.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.800804218+00:00”}

model_id text 2147483647 null
inference_providers.id Implied Constraint R

{“what”:“Identifier of the deployed model (e.g., ‘gpt-4o’).”,“why”:“Distinguishes metrics per model to track version-specific behavior.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.813543953+00:00”}

window_start int8 19 null

{“what”:“Start of the aggregation window as Unix epoch seconds.”,“why”:“Defines the time bucket for which metrics are aggregated; enables time-range queries.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.841658908+00:00”}

window_end int8 19 null

{“what”:“End of the aggregation window as Unix epoch seconds.”,“why”:“Bounds the window; used with window_start to compute duration and align buckets.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.856031391+00:00”}

avg_ttft_ms float8 17,17 √ null

{“what”:“Average time-to-first-token in milliseconds across requests in the window.”,“why”:“Measures perceived latency; high values indicate model or network bottlenecks.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.873614835+00:00”}

p50_ttft_ms float8 17,17 √ null

{“what”:“Median time-to-first-token in milliseconds.”,“why”:“Shows typical latency unaffected by outliers; complements average for skewed distributions.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.886643142+00:00”}

p95_ttft_ms float8 17,17 √ null

{“what”:“95th percentile time-to-first-token in milliseconds.”,“why”:“Reveals worst-case latency for tail users; critical for SLO compliance.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.905321965+00:00”}

avg_tokens_per_sec float8 17,17 √ null

{“what”:“Average token generation throughput per second across requests.”,“why”:“Indicates model throughput; low values may signal resource saturation.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.919424766+00:00”}

p50_tokens_per_sec float8 17,17 √ null

{“what”:“Median token generation throughput per second.”,“why”:“Typical throughput; helps distinguish normal from degraded performance.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.945796587+00:00”}

avg_latency_ms float8 17,17 √ null

{“what”:“Average total request latency in milliseconds (end-to-end).”,“why”:“Captures full request duration; high values affect user experience and cost.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.974365720+00:00”}

success_count int4 10 √ null

{“what”:“Number of successful inference requests in the window.”,“why”:“Base for success_rate; enables volume-weighted analysis.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:14.998864754+00:00”}

failure_count int4 10 √ null

{“what”:“Number of failed inference requests in the window.”,“why”:“Tracks errors; combined with success_count to compute reliability.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:15.011304764+00:00”}

success_rate float8 17,17 √ null

{“what”:“Ratio of successful requests to total requests (0-1).”,“why”:“Directly measures service health; used for alerting on degradation.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:15.035532971+00:00”}

recorded_at timestamptz 35,6 now()

{“what”:“Timestamp when this metric row was written.”,“why”:“Records ingestion time; distinguishes metric window from reporting time.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:15.051675389+00:00”}

source text 2147483647 √ 'openrhythm'::text

{“what”:“Origin of the metric data (e.g., ‘openrhythm’).”,“why”:“Identifies the collector or pipeline; allows filtering by data provenance.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:14:15.074654694+00:00”}

Indexes

Constraint Name Type Sort Column(s)
inference_metrics_pkey Primary key Asc id
idx_metrics_lookup Performance Asc/Asc/Desc provider_id + model_id + window_end
inference_metrics_provider_id_model_id_window_end_key Must be unique Asc/Asc/Asc provider_id + model_id + window_end

Relationships