Open Agent School · Public worked example
Latency & Throughput: meaning and example
Welcome! Take one idea with you today.
Latency is elapsed time for a request or phase. Throughput is completed work per unit of time. Time to first token (TTFT) describes when output starts, while completion latency describes when it ends. Tail percentiles reveal slower experiences that an average may hide.
Picture it: A synthetic service completes twenty ticket-help requests within a ten-second observation window. Nineteen take two seconds each; one takes twelve seconds and began before the window. Its first-token times are set to one fifth of completion time for this exercise. No real traffic was measured.
What is easy to mix up?
Batching and concurrency can raise aggregate completions while worsening first-token delay or tail completion time. Compare distributions at the same workload and quality, including failures and requests that never finished.
Teaching example by Open Agent School. Source: Hugging Face - Streaming and end-user latency.