Skip to content

Commit 6e72173

Browse files
committed
Finishing touches?
1 parent efb025c commit 6e72173

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

.github/workflows/performance_score_director.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
working-directory: ./timefold-solver-benchmarks
7474
shell: bash
7575
run: |
76-
echo "forks=15" > scoredirector-benchmark.properties
76+
echo "forks=20" > scoredirector-benchmark.properties
7777
echo "warmup_iterations=5" >> scoredirector-benchmark.properties
7878
echo "measurement_iterations=15" >> scoredirector-benchmark.properties
7979
echo "relative_score_error_threshold=0.025" >> scoredirector-benchmark.properties
@@ -97,6 +97,7 @@ jobs:
9797
./run-scoredirector.sh
9898
echo "RANGE_START=$(jq '.[0].primaryMetric.scoreConfidence[0]|round' results/scoredirector/${{ github.event.inputs.baseline }}/results.json)" >> "$GITHUB_OUTPUT"
9999
echo "RANGE_END=$(jq '.[0].primaryMetric.scoreConfidence[1]|round' results/scoredirector/${{ github.event.inputs.baseline }}/results.json)" >> "$GITHUB_OUTPUT"
100+
echo "RANGE_MID=$(jq '.[0].primaryMetric.score|round' results/scoredirector/${{ github.event.inputs.baseline }}/results.json)" >> "$GITHUB_OUTPUT"
100101
101102
- name: Phase 2 - Checkout timefold-solver
102103
uses: actions/checkout@v4
@@ -149,6 +150,7 @@ jobs:
149150
./run-scoredirector.sh
150151
echo "RANGE_START=$(jq '.[0].primaryMetric.scoreConfidence[0]|round' results/scoredirector/${{ github.event.inputs.branch }}/results.json)" >> "$GITHUB_OUTPUT"
151152
echo "RANGE_END=$(jq '.[0].primaryMetric.scoreConfidence[1]|round' results/scoredirector/${{ github.event.inputs.branch }}/results.json)" >> "$GITHUB_OUTPUT"
153+
echo "RANGE_MID=$(jq '.[0].primaryMetric.score|round' results/scoredirector/${{ github.event.inputs.branch }}/results.json)" >> "$GITHUB_OUTPUT"
152154
153155
- name: Phase 3 - Archive benchmark data
154156
uses: actions/upload-artifact@v4
@@ -161,21 +163,21 @@ jobs:
161163
working-directory: ./timefold-solver-benchmarks
162164
env:
163165
OLD_RANGE_START: ${{ steps.benchmark_baseline.outputs.RANGE_START }}
166+
OLD_RANGE_MID: ${{ steps.benchmark_baseline.outputs.RANGE_MID }}
164167
OLD_RANGE_END: ${{ steps.benchmark_baseline.outputs.RANGE_END }}
165168
NEW_RANGE_START: ${{ steps.benchmark_new.outputs.RANGE_START }}
169+
NEW_RANGE_MID: ${{ steps.benchmark_new.outputs.RANGE_MID }}
166170
NEW_RANGE_END: ${{ steps.benchmark_new.outputs.RANGE_END }}
167171
shell: bash
168172
run: |
169173
export FAIL=false
170174
if [ "$NEW_RANGE_START" -le "$OLD_RANGE_END" ] && [ "$NEW_RANGE_END" -ge "$OLD_RANGE_START" ]; then
171-
export OLD_MEAN=$(((OLD_RANGE_END - OLD_RANGE_START)/2)+OLD_RANGE_START)
172-
export NEW_MEAN=$(((NEW_RANGE_END - NEW_RANGE_START)/2)+NEW_RANGE_START)
173-
if [ "$NEW_RANGE_START" -ge "$OLD_MEAN" ]; then
175+
if [ "$NEW_RANGE_START" -ge "$OLD_RANGE_MID" ]; then
174176
echo "### 🍀Possible improvement 🍀" >> $GITHUB_STEP_SUMMARY
175-
elif [ "$OLD_RANGE_END" -le "$NEW_MEAN" ]; then
177+
elif [ "$OLD_RANGE_END" -le "$NEW_RANGE_MID" ]; then
176178
echo "### ⚠️Possible regression ⚠️" >> $GITHUB_STEP_SUMMARY
177179
else
178-
echo "### Performance unchanged" >> $GITHUB_STEP_SUMMARY
180+
echo "### Performance unchanged " >> $GITHUB_STEP_SUMMARY
179181
fi
180182
elif [ "$NEW_RANGE_START" -gt "$OLD_RANGE_END" ]; then
181183
echo "### 🚀🚀🚀 Statistically significant improvement 🚀🚀🚀" >> $GITHUB_STEP_SUMMARY
@@ -185,14 +187,16 @@ jobs:
185187
fi
186188
187189
export DIFF_START=$(echo "scale=2; ($OLD_RANGE_START / $NEW_RANGE_START) * 100" | bc)
190+
export DIFF_MID=$(echo "scale=2; ($OLD_RANGE_MID / $NEW_RANGE_MID) * 100" | bc)
188191
export DIFF_END=$(echo "scale=2; ($OLD_RANGE_END / $NEW_RANGE_END) * 100" | bc)
189192
190-
echo "| | **Ref** | **Min** | **Max** |" >> $GITHUB_STEP_SUMMARY
191-
echo "|:------:|:-----------:|:-----------------:|:-----------------:|" >> $GITHUB_STEP_SUMMARY
192-
echo "| _Old_ | ${{ github.event.inputs.baseline }} | ${OLD_RANGE_START} | ${OLD_RANGE_END} |" >> $GITHUB_STEP_SUMMARY
193-
echo "| _New_ | ${{ github.event.inputs.branch }} | ${NEW_RANGE_START} | ${NEW_RANGE_END} |" >> $GITHUB_STEP_SUMMARY
194-
echo "| _Diff_ | | ${DIFF_START} % | ${DIFF_END} % |" >> $GITHUB_STEP_SUMMARY
193+
echo "| | **Ref** | **Min** | **Mean** | **Max** |" >> $GITHUB_STEP_SUMMARY
194+
echo "|:------:|:-----------:|:-----------------:|:-----------------:|:-----------------:|" >> $GITHUB_STEP_SUMMARY
195+
echo "| _Old_ | ${{ github.event.inputs.baseline }} | ${OLD_RANGE_START} | ${OLD_RANGE_MID} | ${OLD_RANGE_END} |" >> $GITHUB_STEP_SUMMARY
196+
echo "| _New_ | ${{ github.event.inputs.branch }} | ${NEW_RANGE_START} | ${NEW_RANGE_MID} | ${NEW_RANGE_END} |" >> $GITHUB_STEP_SUMMARY
197+
echo "| _Diff_ | | ${DIFF_START} % | ${DIFF_MID} % | ${DIFF_END} % |" >> $GITHUB_STEP_SUMMARY
195198
199+
echo "" >> $GITHUB_STEP_SUMMARY
196200
echo "Min and max define a 99.9 % confidence interval." >> $GITHUB_STEP_SUMMARY
197201
echo "Min and max are in operations per second. Higher is better." >> $GITHUB_STEP_SUMMARY
198202
echo "Diff over 100 % represents an improvement, under 100 % a regression." >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)