public long getLatency ( ) { if ( latency >= 0L ) { return latency ; } else if ( events . size ( ) >= 2 ) { return events . get ( events . size ( ) - 1 ) . timestamp ( ) - events . get ( 0 ) . timestamp ( ) ; } else { return - 1 ; } }
Return the latency for the request . If not explicitly set it will be calculated from the events .