Skip to content
01Home 02Capability Matrix 03Tools 04Benchmark Rankings 05Tracks 06About Us
The Repro Lab · AI coverage organised as a matrix of capability × stage. Not sorted by tool, but by where you are right now.
Updated every Wednesday

Measure TTFT, Total Time, and Queue Delay

Latency complaints often mix model speed with queue wait and client overhead. This article defines TTFT, total time, and queue delay for Mistral Large 4 workflows, shows how to measure each cleanly, and explains which optimizations actually move the number you report to users.

Oct 23, 2026
Measure TTFT, Total Time, and Queue Delay The Benchmark Room

Saying a model is “slow” without splitting the timeline leads to the wrong fix. Users feel total time. Operators need component times. For Mistral Large 4 paths, separate queue delay, time to first token, and total generation time, then include your own validation overhead. Measure each with clocks you control.

Saying a model is “slow” without splitting the timeline leads to the wrong fix. Users feel total time

Define the Segments

Queue delay

Queue delay starts when work is accepted by your system and ends when a worker begins the provider request. It includes backlog, scheduling, and claim latency. If you call Mistral in-process on the request thread, queue delay may be near zero while user-facing time still includes everything else. Name the queue explicitly in async designs.

Time to first token

TTFT starts when the provider request is sent and ends when the first response token or first usable chunk arrives. For non-streaming calls, a proxy measure is time to first byte of the completed body, but true TTFT needs streaming. Do not label total time as TTFT; that misleads capacity planning and vendor comparisons.

Total generation time

Total generation time runs from request send to last token or full body receipt. It includes TTFT and the remainder of decoding. Streaming systems should still record end-to-end generation for capacity, even when UI paints earlier. Report both when product and infrastructure audiences differ.

Client-side overhead

Validation, serialization, and business logic after receipt are not model latency. Measure them separately or users will blame Mistral for Pydantic or Rust validation spikes. A honest dashboard stacks queue, TTFT, remaining generation, and post-processing as distinct series.

Instrumentation Design

Clocks and trace context

Use monotonic clocks for durations and wall clocks for timestamps in logs. Propagate a request id from ingress through queue to worker. Without a shared id, joining queue delay to TTFT becomes guesswork. Trace spans should nest: accept, dequeue, provider, validate, complete.

Streaming versus buffered

If you buffer the full response, you cannot publish true TTFT. Enable streaming when TTFT is a product KPI. If product does not stream to users, you may still stream internally to the gateway for metrics, then forward the final payload. Document which path your numbers come from.

Clock alignment across services

Queue timestamps from one host and provider starts from another need comparable bases. Prefer span times from a tracing system over ad hoc log subtraction across machines with drift. If you must subtract logs, ensure NTP health is part of the measurement runbook.

Cardinality control

Label metrics by route and model id, not by raw prompt. High cardinality labels will break metric systems and tempt teams to stop measuring. Keep outcome class labels small: success, timeout, validation_error, upstream_error.

Measurement Method

Controlled load profile

Define concurrent jobs, payload sizes, and think time. Run against production-like regions. A laptop timing a single call is not a latency benchmark. Record whether the run hit a cold or warm path if your gateway pools connections.

Percentiles over averages

Track p50, p95, and p99 for each segment. Averages hide the tail users remember. For capacity, p95 queue delay under expected concurrency is often more actionable than mean TTFT in an empty system.

Steady state and burst

Measure steady offered load and a burst window. Queue delay may look fine until concurrency exceeds workers. Publish both. If you only test idle systems, you will ship an architecture that collapses at standup time for a product launch.

Method checklist table

Step

Requirement

Define segment boundaries

Written in the runbook

Use request ids

Present on all spans

Record percentiles

p50, p95, p99 minimum

Note model id pin

Preview drift otherwise

Separate post-process

Validation not in TTFT

Store raw run config

Concurrency, payload sizes

Interpreting Results

High queue delay

Scale workers, reduce per-job time, or shed load. Tuning temperature will not fix a backed-up queue. Product may need async UX if queue delay is inherent to batch work. Treat persistent queue growth as a capacity incident, not a model quality issue.

High TTFT

Investigate connection setup, region distance, provider load, and prompt size. Large multimodal payloads can delay first tokens. Confirm you are not including queue time by mistake. If TTFT is only bad on cold workers, look at pool warming and DNS, not only at the model.

High total time with fine TTFT

The model is streaming early but generating long completions. Tighten max tokens, reduce verbosity in instructions, or change product expectations about answer length. Long reasoning-style outputs can inflate totals without changing TTFT much.

Interpretation matrix

Pattern

Likely locus

First lever

Queue up, TTFT fine

Workers or backlog

Scale or shed

TTFT up, queue fine

Provider path or payload

Region, size, pooling

Total up, TTFT fine

Long completions

Max tokens, prompts

All up after deploy

Pin or routing change

Diff config, roll back

Relating Latency to Cost and Errors

Timeouts cut the distribution

Aggressive timeouts improve worst-case user wait and increase error rates. Publish success latency and error rate together. Optimizing latency by failing more is a product decision, not a free win. Align timeout budgets with queue and generation segments.

Retries stretch totals

A single user-visible attempt may include multiple provider attempts. Measure per-attempt TTFT and total budget consumption separately. Otherwise a “latency regression” may actually be a retry policy change. Log attempt numbers on the same request id.

Validation spikes

If post-process time grows with payload size, cap structures at the boundary. Rust or Python validation should be a thin slice relative to generation for typical jobs. When it is not, profiles before blaming Mistral Large 4 for application CPU.

Reporting to stakeholders

Show a stacked timeline for a representative p95 request. Narratives without diagrams invite arguments. Be explicit about preview model ids and dates. Latency claims without pins are not reproducible, and unreproducible claims should not drive architecture.

Aggressive timeouts improve worst-case user wait and increase error rates

Building a Repeatable Benchmark Harness

Fixture payloads

Store small, medium, and large prompts with stable expected shapes. Exclude personal data. Multimodal fixtures should use licensed or synthetic images. Changing fixtures between runs invalidates trend lines. Version the fixture pack with the harness code.

Environment pins

Pin model id, gateway version, worker count, and region. Record provider-side incidents if known. A fair comparison across weeks needs those pins. Without them you compare different systems that share a brand name only.

Automation

Run the harness on a schedule and on every candidate config change. Fail CI soft or hard when p95 exceeds a budget you chose before the run. Do not move the budget after seeing results to make a change look neutral.

Limits of lab numbers

Harnesses miss multi-tenant interference and real prompt diversity. Use lab percentiles to catch regressions; use production traces to set user SLOs. Hypothetical lab wins that never appear in production traces are not wins.

Production Verdict

Measurement rule

Split queue delay, TTFT, remaining generation, and post-processing. Optimize the segment that actually moved. Mistral Large 4 performance is only one slice of user-visible time.

Checklist

Segment definitions written. Monotonic clocks. Request ids. Streaming path if TTFT is a KPI. Percentiles recorded. Fixtures versioned. Model id pinned. Timeouts and retries documented. Dashboards stacked by segment. Production traces compared to lab runs.

Decision guide

If users wait before work starts, fix queues. If the UI waits on first paint, fix TTFT path. If answers stream early but finish late, fix completion length and max tokens. If time is high after the body arrives, fix validation and downstream I/O.

Boundary

Latency metrics must be reproducible to be actionable. If the run cannot be reproduced from pins and fixtures, it cannot be reviewed. Measure the failure path too: timeouts and retries belong in the same report as happy-path p50.

Reader responses

No responses on this piece yet.

Write what you observed