This document catalogs every benchmark metric listed in the README, its OTel instrument, where it is recorded, and how it flows through the pipeline to telemetry.spiceai.io.
SpiceBench (OTel instruments)
├─ Query Driver ──► per-query gauges ──► Telemetry.emit() ──► telemetry.spiceai.io
├─ StreamingOtlpExporter ──► real-time histograms/counters ──► --otlp-endpoint
└─ SUT Adapter (JSON-RPC `metrics`) ──► scraped gauges ──► Telemetry.emit() ──► telemetry.spiceai.io
All metrics in this inventory are emitted through Telemetry.emit() after the benchmark run completes.
-
Data Size (total bytes ingested) OTel instrument:
ingestion_bytes_total(Gauge\<u64\>). Source: SUT adaptermetrics->ingestion.bytes_ingested. -
Ingestion records/s OTel instrument:
ingestion_rows_per_sec(Gauge\<f64\>). Source: SUT adaptermetrics->ingestion.rows_per_sec. -
Ingestion rows total OTel instrument:
ingestion_rows_total(Gauge\<u64\>). Source: SUT adaptermetrics->ingestion.rows_ingested. -
Connections / Clients OTel instrument:
active_connections(Gauge\<u64\>). Source: CLI--concurrencyplus SUT adaptermetrics->ingestion.active_connections. -
Queries/s, Requests/s OTel instruments:
queries_per_sec(Gauge\<f64\>),queries_total(Counter\<u64\>). Source: Computed from total iterations and benchmark duration. -
Query Latency (p50) OTel instrument:
median_duration_ms(Gauge\<u64\>). Source: Query driver per-query statistics. -
Query Latency (p99) OTel instrument:
p99_duration_ms(Gauge\<u64\>). Source: Query driver per-query statistics. -
Efficiency (cores) OTel instrument:
efficiency_queries_per_core(Gauge\<f64\>). Source: Computed asqueries_per_sec / cpu_cores. -
Resource Usage - CPU OTel instrument:
sut_cpu_usage_percent(Gauge\<f64\>). Source: SUT adaptermetrics->resource.cpu_usage_percent. -
Resource Usage - Memory OTel instruments:
peak_memory_usage_mb(Gauge\<f64\>),median_memory_usage_mb(Gauge\<f64\>),sut_memory_usage_bytes(Gauge\<u64\>). Source: Local process viasysinfoplus SUT adaptermetrics. -
Resource Usage - Disk OTel instruments:
sut_disk_read_bytesandsut_disk_write_bytes(Gauge\<u64\>). Source: SUT adaptermetrics->resource.disk_read_bytesandresource.disk_write_bytes. -
Resource Usage - IOPS OTel instruments:
sut_disk_read_iopsandsut_disk_write_iops(Gauge\<u64\>). Source: SUT adaptermetrics->resource.disk_read_iopsandresource.disk_write_iops. -
E2E Latency OTel instrument:
e2e_latency_ms(Histogram\<f64\>). Source: Raw freshness scraper samples fromMAX(__created_at)deltas; percentiles are computed in dashboard queries. -
E2E Duration OTel instrument:
test_duration_ms(Gauge\<u64\>). Source: Wall-clock time of the timed benchmark phase. -
Query Queue Length OTel instrument:
query_queue_length(Gauge\<u64\>). Source: Query worker queue depth at query execution start, withquery_nameandclient_idattributes. -
Query Queue Duration OTel instrument:
query_queue_duration_ms(Histogram\<f64\>). Source: Query worker queue wait time before execution, withquery_nameandclient_idattributes. -
Checkpoint In-flight Queries OTel instrument:
checkpoint_in_flight_queries(Gauge\<u64\>). Source: Active in-flight query count while checkpoint validation windows are enabled, with aclient_idattribute.
When --otlp-endpoint is configured, the following are exported every 5 seconds via a separate PeriodicReader:
| Metric | OTel Instrument | Description |
|---|---|---|
spicebench.streaming.query.duration_ms |
Histogram<f64> | Per-query execution duration |
spicebench.streaming.query.count |
Counter<u64> | Total queries executed |
spicebench.streaming.query.success_count |
Counter<u64> | Successful queries |
spicebench.streaming.query.failure_count |
Counter<u64> | Failed queries |
The system adapter protocol now includes a metrics JSON-RPC method that SpiceBench scrapes periodically (every 5s) when --scrape-sut-metrics is enabled.
{
"jsonrpc": "2.0",
"id": 1,
"method": "metrics",
"params": { "run_id": "<uuid>" }
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"resource": {
"cpu_usage_percent": 45.2,
"memory_usage_bytes": 8589934592,
"disk_read_bytes": 1073741824,
"disk_write_bytes": 2147483648,
"disk_read_iops": 5000,
"disk_write_iops": 3000
},
"ingestion": {
"rows_ingested": 10000000,
"bytes_ingested": 5368709120,
"rows_per_sec": 50000.0,
"active_connections": 8
}
}
}All fields in resource and ingestion are optional (null / omitted if not available from the SUT).
The default Handler::metrics() implementation returns empty metrics, so existing adapters remain compatible without changes.
- E2E Latency dashboard expansion: Add optional additional percentile panels (e.g., p50/p90/p99.9) computed from
e2e_latency_msin Flux.