Return the processing time for the current request. @return the processing time
()
| 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. |
nothing calls this directly
no test coverage detected