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

TensorRT-LLM cached-prompt-tokens-per-request histogram

tensorrt-llm · histogram

Fields

id
metric-exposures/w3m-tensorrt-llm-trtllm-prompt-cached-tokens-per-request
Metric name
trtllm_prompt_cached_tokens_per_request
Metric type
histogram
Unit
tokens
Exposure
prometheus
Endpoint
:8000/prometheus/metrics
Histogram buckets
0641282565121024204840968192
Labels
model_nameengine_type
Enabled by default
no
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. Hard-coded buckets including an explicit 0 lower bound, so unlike every other token histogram in this repo it distinguishes a zero-cache-hit request from a one-token hit.

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. Hard-coded buckets including an explicit 0 lower bound, so unlike every other token histogram in this repo it distinguishes a zero-cache-hit request from a one-token hit.

Cross-references