siddharthteotia commented on a change in pull request #6936: URL: https://github.com/apache/incubator-pinot/pull/6936#discussion_r636631845
########## File path: pinot-core/src/main/java/org/apache/pinot/core/transport/ServerResponse.java ########## @@ -50,6 +51,14 @@ public int getSubmitDelayMs() { } } + public int getRequestSentDelayMs() { + if (_sendRequestTimeMs != 0) { + return (int) (_sendRequestTimeMs - _startTimeMs); + } else { + return -1; + } Review comment: The following is correct for existing `getSubmitDelayMs()` API ``` public int getSubmitDelayMs() { if (_submitRequestTimeMs != 0) { return (int) (_submitRequestTimeMs - _startTimeMs); } else { return -1; } } ``` But what you are measuring is delay it took on the wire `getRequestSentDelayMs()`, so you should no rely on _startTime. Simply change the API to record the time ``` void markRequestSent(ServerRoutingInstance serverRoutingInstance, long timeMs) { _responseMap.get(serverRoutingInstance).markRequestSent(timeMs); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org