// Run the benchmark a few times to let JIT kick in
int bucketSizeMs = bucketSizeS * 1000;
int trialLengthMs = trialLengthS * 1000;
runExperiment(15.0, coreThreadPoolSize, coreThreadPoolSize, bucketSizeMs,
trialLengthMs, new DescriptiveStatistics(), new DescriptiveStatistics());
runExperiment(15.0, coreThreadPoolSize, coreThreadPoolSize, bucketSizeMs,
trialLengthMs, new DescriptiveStatistics(), new DescriptiveStatistics());
for (double i = startRate; i <= endRate; i = i + rateStep) {
try {
DescriptiveStatistics runTimes = new DescriptiveStatistics();
DescriptiveStatistics waitTimes = new DescriptiveStatistics();
runExperiment(i, coreThreadPoolSize, coreThreadPoolSize, bucketSizeMs,
trialLengthMs, runTimes, waitTimes);
System.out.println(i + " run " + runTimes.getPercentile(50.0) + " " +
runTimes.getPercentile(95) + " " + runTimes.getPercentile(99));
System.out.println(i + " wait " + waitTimes.getPercentile(50.0) + " " +
waitTimes.getPercentile(95) + " " + waitTimes.getPercentile(99));
}
catch (RuntimeException e) {
System.out.println(e);
break;
}
}
for (double i = startRate; i <= endRate; i = i + rateStep) {
try {
DescriptiveStatistics runTimes = new DescriptiveStatistics();
DescriptiveStatistics waitTimes = new DescriptiveStatistics();
runExperiment(i, coreThreadPoolSize, Integer.MAX_VALUE, bucketSizeMs,
trialLengthMs, runTimes, waitTimes);
System.out.println(i + " run " + runTimes.getPercentile(50.0) + " " +
runTimes.getPercentile(95) + " " + runTimes.getPercentile(99));
System.out.println(i + " wait " + waitTimes.getPercentile(50.0) + " " +
waitTimes.getPercentile(95) + " " + waitTimes.getPercentile(99));
}
catch (RuntimeException e) {
System.out.println(e);
break;
}