OPENDJ-2246 Fix xxxrate tools NaN err/sec
If no errors are reported, it is ok to print that we have 0.0 err/sec.
If we have an interval duration equals to zero (it could append when tool start), this fix prevents us to print a 'NaN'.
| | |
| | | printableStats[i++] = getDivisionResult(computedPercentiles.get(j) , 1000.0, 2); |
| | | } |
| | | i = 4 + percentiles.length; |
| | | printableStats[i++] = getDivisionResult(intervalFailedCount, intervalDurationSec, 1); |
| | | printableStats[i++] = intervalFailedCount == 0 |
| | | ? "0.0" |
| | | : getDivisionResult(intervalFailedCount, intervalDurationSec, 1); |
| | | if (isAsync) { |
| | | printableStats[i++] = getDivisionResult(intervalOperationCount, intervalResultCount, 1); |
| | | } |