Latency
Elapsed time from a defined start event to a defined completion event; meaningful only when the measurement boundary is stated explicitly.
Define the Boundary First
Latency can mean network round trip, queue wait, database response, model inference or complete user-visible completion time. These are different measurements.
For a production pipeline, end-to-end latency often contains queueing, preprocessing, service execution, post-processing and transport.
Average Is Not the Tail
A low mean can coexist with rare but operationally damaging slow requests. p95/p99 and maximum behavior are therefore important when deadlines or user experience depend on the tail.
Throughput and latency are related but not interchangeable.