Skip to content

Commit

Permalink
chore: reconfigure for a new machine
Browse files Browse the repository at this point in the history
  • Loading branch information
triceo committed Nov 12, 2024
1 parent 7b1801b commit 5f8244e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/performance_score_director.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion run-coldstart.sh
Original file line number Diff line number Diff line change
@@ -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
java -cp target/benchmarks.jar -Djmh.ignoreLock=true ai.timefold.solver.benchmarks.micro.coldstart.Main
2 changes: 1 addition & 1 deletion run-scoredirector.sh
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5f8244e

Please sign in to comment.