inference/research
verifiedhigh · 0.94updated 2026-10-04

TensorRT-LLM time-to-first-token histogram

tensorrt-llm · histogram

Fields

id
metric-exposures/w3m-tensorrt-llm-trtllm-time-to-first-token-seconds
Metric name
trtllm_time_to_first_token_seconds
Metric type
histogram
Unit
seconds
Exposure
prometheus
Endpoint
:8000/prometheus/metrics
Histogram buckets
0.0010.0050.010.020.040.060.080.10.250.50.7512.557.5102040801606402560
Labels
model_nameengine_type
Enabled by default
no
Phase scoped
yes
notes
TensorRT-LLM main, MetricsCollector in tensorrt_llm/metrics/collector.py, read 2026-10-04. collector.py line 32 carries the header comment 'Adapted from https://github.com/vllm-project/vllm/blob/v0.10.0rc1/vllm/engine/metrics.py#L30', so this is a vLLM fork with the prefix swapped to trtllm_. NOT ON BY DEFAULT: the collector is only constructed and /prometheus/metrics only mounted when --return_perf-metrics is set (llm_args default False). Endpoint is :8000/prometheus/metrics - NOT /metrics, and the server's own GET /metrics serves a JSON iteration-stats snapshot, so a scraper pointed at /metrics gets JSON rather than exposition text. Labels are model_name and engine_type. Bucket boundaries are a constructor argument (time_to_first_token_buckets), so trtllm-serve's prometheus_metrics_config overrides them; the literal here is the library default and is byte-identical to vLLM's TTFT ladder, which is what a fork of the collector should produce.

Notes

TensorRT-LLM main, MetricsCollector in tensorrt_llm/metrics/collector.py, read 2026-10-04. collector.py line 32 carries the header comment 'Adapted from https://github.com/vllm-project/vllm/blob/v0.10.0rc1/vllm/engine/metrics.py#L30', so this is a vLLM fork with the prefix swapped to trtllm_. NOT ON BY DEFAULT: the collector is only constructed and /prometheus/metrics only mounted when --return_perf-metrics is set (llm_args default False). Endpoint is :8000/prometheus/metrics - NOT /metrics, and the server's own GET /metrics serves a JSON iteration-stats snapshot, so a scraper pointed at /metrics gets JSON rather than exposition text. Labels are model_name and engine_type. Bucket boundaries are a constructor argument (time_to_first_token_buckets), so trtllm-serve's prometheus_metrics_config overrides them; the literal here is the library default and is byte-identical to vLLM's TTFT ladder, which is what a fork of the collector should produce.

Cross-references