Repository: mlcommons/inference
Issue: What is the difference between latency and duration?
Root cause: Documentation Deficiency

![image](https://user-images.githubusercontent.com/55476509/65403723-28640f80-de10-11e9-8cd7-9ad17e36f21c.png)

In mlperf git, latency is explainted like that. 

It sounds like time difference between two points. 

In result summary, there is duration.

What is the difference btw latency and duration ? 

The duration of a run is difference between the time when LoadGen receives the last inference response and the time when it issues the first query. The latency for a query is the difference between the time time when the LoadGen receives a reply and the time when the query was scheduled.

@tjablin To clarify, for a run with only one query, is the latency the same as the duration? 

In this case, I assume that "the time when LoadGen receives the last inference response" is the same as "the time time when the LoadGen receives a reply". But are "the time when it issues the first query" and "the time when the query was scheduled" the same?

> But are "the time when it issues the first query" and "the time when the query was scheduled" the same?

What happens if you send SIGSTOP to the LoadGen in the Server scenario in QueryScheduler::Wait right before the call to std::this_thread::sleep_until? At least in theory, there can be a gap between when the first query was scheduled to be issued and when the first query was actually issued.

@tjablin  

Can I understand like this ?

query start --- query end : Latency 
query start --- query end ,  .............Every query........ ,query start --- query end : Duration 

query start and finishing is latency
begin of entire query and finish last query is Duration

A query is like an airplane flight. Every flight has a designated departure time. Sometimes flights depart late. The latency of a flight is the time between the scheduled departure and actual arrival. The clock starts when the plane is supposed to leave. The airport is scheduled to open at 6 AM. The first flight is scheduled to depart at 7 AM. The last flight landed at 2 AM. The duration is 20 hours. If the first flight is delay to 8 AM and landed a 9 AM, the latency of the flight was 2 hours.

@tjablin  

I can not get  
7am to 2am -> 20 hours duration
7AM departure delay to 8am -> 2 hour latency 

Um Can I have one more explanation

Scheduled departure (7 am , actual departure )  and actual arriving ( 9am )  : 2 hours latency of plane can be query )

Airport schedule open 6am -->  --> last flight 2am  : 20 hours duration 


Not start where first plane depart , start when airport schedule begin ? 

Can I understand like this ? 

The duration of a run is difference between the time when LoadGen receives the last inference response and the time when it issues the first query.

Can I think first plane departure as first query issue?
( I am confusing btw first plane departure and airport open)

Thank you @tjablin 

There is max latency and min latency in summary.

Since latency is  "The latency for a query is the difference between the time time when the LoadGen receives a reply and the time when the query was scheduled."

What is the meaning of those term? 

Btw every query latency, most high latency is max and low is min latency ?
Can I understand like this ? 


How should I understand 50 percentile latency ?