diff --git a/.github/workflows/performance_score_director.yml b/.github/workflows/performance_score_director.yml index bd5d7483..5443867b 100644 --- a/.github/workflows/performance_score_director.yml +++ b/.github/workflows/performance_score_director.yml @@ -16,7 +16,7 @@ on: required: true baseline: description: 'Timefold Solver release' - default: '1.15.0' + default: '1.16.0' required: true branch: description: 'Branch to benchmark (needs to use 999-SNAPSHOT)' @@ -75,7 +75,7 @@ jobs: echo "forks=20" > scoredirector-benchmark.properties echo "warmup_iterations=10" >> scoredirector-benchmark.properties echo "measurement_iterations=10" >> scoredirector-benchmark.properties - echo "relative_score_error_threshold=0.025" >> scoredirector-benchmark.properties + echo "relative_score_error_threshold=0.02" >> scoredirector-benchmark.properties echo "score_director_type=cs" >> scoredirector-benchmark.properties echo "example=${{ matrix.example }}" >> scoredirector-benchmark.properties cat scoredirector-benchmark.properties @@ -174,10 +174,10 @@ jobs: export DIFF_END=$(echo "scale=2; ($OLD_RANGE_END / $NEW_RANGE_END) * 100" | bc) export FAIL=false - if (( $(echo "$DIFF_MID >= 97.00" | bc -l) && $(echo "$DIFF_MID <= 103.00"|bc -l) )); then - # Ignore differences of up to 3 %. + if (( $(echo "$DIFF_MID >= 98.00" | bc -l) && $(echo "$DIFF_MID <= 102.00"|bc -l) )); then + # Ignore differences of up to 2 %. echo "### Performance unchanged" >> $GITHUB_STEP_SUMMARY - echo "(Decided to ignore a very small difference of under 3 %.)" >> $GITHUB_STEP_SUMMARY + echo "(Decided to ignore a very small difference of under 2 %.)" >> $GITHUB_STEP_SUMMARY else if [ "$NEW_RANGE_START" -le "$OLD_RANGE_END" ] && [ "$NEW_RANGE_END" -ge "$OLD_RANGE_START" ]; then if [ "$NEW_RANGE_START" -ge "$OLD_RANGE_MID" ]; then diff --git a/run-coldstart.sh b/run-coldstart.sh index 24339d18..1607698a 100755 --- a/run-coldstart.sh +++ b/run-coldstart.sh @@ -1,4 +1,4 @@ #!/bin/bash sudo -i sysctl kernel.perf_event_paranoid=1 sudo -i sysctl kernel.kptr_restrict=0 -taskset -c 0 java -cp target/benchmarks.jar ai.timefold.solver.benchmarks.micro.coldstart.Main \ No newline at end of file +java -cp target/benchmarks.jar -Djmh.ignoreLock=true ai.timefold.solver.benchmarks.micro.coldstart.Main \ No newline at end of file diff --git a/run-scoredirector.sh b/run-scoredirector.sh index fc5cff60..16b2676e 100755 --- a/run-scoredirector.sh +++ b/run-scoredirector.sh @@ -1,4 +1,4 @@ #!/bin/bash sudo -i sysctl kernel.perf_event_paranoid=1 sudo -i sysctl kernel.kptr_restrict=0 -java -cp target/benchmarks.jar ai.timefold.solver.benchmarks.micro.scoredirector.Main +java -cp target/benchmarks.jar -Djmh.ignoreLock=true ai.timefold.solver.benchmarks.micro.scoredirector.Main diff --git a/src/main/java/ai/timefold/solver/benchmarks/micro/common/AbstractMain.java b/src/main/java/ai/timefold/solver/benchmarks/micro/common/AbstractMain.java index 2bdb9373..ddc8858a 100644 --- a/src/main/java/ai/timefold/solver/benchmarks/micro/common/AbstractMain.java +++ b/src/main/java/ai/timefold/solver/benchmarks/micro/common/AbstractMain.java @@ -109,8 +109,10 @@ protected ChainedOptionsBuilder initAsyncProfiler(ChainedOptionsBuilder options) "output=jfr;" + "dir=" + resultsDirectory.toAbsolutePath() + ";" + "libPath=" + asyncProfilerPath); - }) - .orElseThrow(() -> new IllegalStateException("Impossible state: Async profiler not found.")); + }).orElseGet(() -> { + LOGGER.warn("Async profiler not found."); + return options; + }); } protected void convertJfrToFlameGraphs() { @@ -178,7 +180,7 @@ public ChainedOptionsBuilder getBaseJmhConfig(C configuration) { .forks(configuration.getForkCount()) .warmupIterations(configuration.getWarmupIterations()) .measurementIterations(configuration.getMeasurementIterations()) - .jvmArgs("-XX:+UseSerialGC", "-Xmx2g") // Throughput-focused GC. + .jvmArgs("-XX:+UseParallelGC", "-Xmx2g") // Throughput-focused GC. .result(resultsDirectory.resolve("results.json").toAbsolutePath().toString()) .resultFormat(ResultFormatType.JSON) .shouldDoGC(true);