MCPcopy Create free account
hub / github.com/apache/tomcat / getRequestProcessingTime

Method getRequestProcessingTime

java/org/apache/coyote/RequestInfo.java:202–211  ·  view source on GitHub ↗

Return the processing time for the current request. @return the processing time

()

Source from the content-addressed store, hash-verified

200 * @return the processing time
201 */
202 public long getRequestProcessingTime() {
203 // Not perfect, but good enough to avoid returning strange values due to
204 // concurrent updates.
205 long startTime = req.getStartTimeNanos();
206 if (getStage() == Constants.STAGE_ENDED || startTime < 0) {
207 return 0;
208 } else {
209 return TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTime);
210 }
211 }
212
213 // -------------------- Statistical data --------------------
214 // Collected at the end of each request.

Callers

nothing calls this directly

Calls 2

getStageMethod · 0.95
getStartTimeNanosMethod · 0.80

Tested by

no test coverage detected