This is an automated email from the ASF dual-hosted git repository. aherbert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-rng.git
commit f1962852c51e9a6b67409de76751f54ab77aa427 Author: aherbert <aherb...@apache.org> AuthorDate: Wed Oct 16 11:03:04 2019 +0100 Use binary search upper bound for the time estimate. This ensures the time cut-off is >50% max run-time. --- .../java/org/apache/commons/rng/examples/stress/StressTestCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/StressTestCommand.java b/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/StressTestCommand.java index 5de6a32..ef1dc0f 100644 --- a/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/StressTestCommand.java +++ b/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/StressTestCommand.java @@ -723,7 +723,7 @@ class StressTestCommand implements Callable<Void> { } } // Use the median of all tasks within approximately 50% of the max. - return sortedDurations[(lower + completed - 1) / 2]; + return sortedDurations[(upper + completed - 1) / 2]; } /**