OPENDJ-2968 Prevent console flooding for xxxrate tools
If we compute a negative response time, we catch the runtime exception
raised by HdrHistogram in order to prevent flooding console with stack
trace.
| | |
| | | } |
| | | |
| | | void addResponseTime(final long responseTimeNs) { |
| | | if (!warmingUp) { |
| | | waitDurationNsCount.inc(responseTimeNs); |
| | | // The computed response time might be negative if the difference between the two |
| | | // System.nanoTime() calls (Just before sending the request and right after receiving the response) |
| | | // is incoherent. See OPENDJ-2968 for more details. |
| | | if (!warmingUp && responseTimeNs >= 0) { |
| | | responseTimes.update(responseTimeNs); |
| | | waitDurationNsCount.inc(responseTimeNs); |
| | | } |
| | | } |
| | | |