Skip to content

Commit d6d3d21

Browse files
authored
Add PR performance gate (#8970)
* feat(ci): PR performance gate * chore(ci): Review comments * feat(ci): Explicitly rely on job artifacts, drop dacapo * fix(ci): revert removal of ARTIFACTSDIR for bp-runner.fail-on-regression.yml path * chore(ci): replace ARTIFACTSDIR by CI_PROJECT_DIR for bp-runner.fail-on-regression.yml path * chore(ci): Move threshold to 10% * chore(ci): Allow failure on PR gate to exercise it * chore(ci): Disable failure but increase regression threshold (to be refined) * chore(ci): Choose 10% as threshold. 20% was chosen due to variability of the results on unrelated changes. After discussion in lp-sync, 20% won't get us to move forward and entice to fix the problems. So instead choose a closer threshold to 10%.
1 parent 8c372e3 commit d6d3d21

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.gitlab/benchmarks.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,36 @@ benchmarks-post-results:
6868
- job: benchmarks-dacapo
6969
artifacts: true
7070

71+
check-big-regressions:
72+
extends: .benchmarks
73+
needs:
74+
- job: benchmarks-startup
75+
artifacts: true
76+
- job: benchmarks-load
77+
artifacts: true
78+
when: on_success
79+
tags: ["arch:amd64"]
80+
# ARTIFACTS_DIR /go/src/github.com/DataDog/apm-reliability/dd-trace-java/reports/
81+
# need to convert them
82+
script:
83+
- !reference [ .benchmarks, script ]
84+
- |
85+
for benchmarkType in startup load; do
86+
find "$ARTIFACTS_DIR/$benchmarkType" -name "benchmark-baseline.json" -o -name "benchmark-candidate.json" | while read file; do
87+
relpath="${file#$ARTIFACTS_DIR/$benchmarkType/}"
88+
prefix="${relpath%/benchmark-*}" # Remove the trailing /benchmark-(baseline|candidate).json
89+
prefix="${prefix#./}" # Remove any leading ./
90+
prefix="${prefix//\//-}" # Replace / with -
91+
case "$file" in
92+
*benchmark-baseline.json) type="baseline" ;;
93+
*benchmark-candidate.json) type="candidate" ;;
94+
esac
95+
echo "Moving $file to $ARTIFACTS_DIR/${type}-${prefix}.converted.json"
96+
cp "$file" "$ARTIFACTS_DIR/${type}-${prefix}.converted.json"
97+
done
98+
done
99+
- bp-runner $CI_PROJECT_DIR/.gitlab/benchmarks/bp-runner.fail-on-regression.yml --debug
100+
71101
.dsm-kafka-benchmarks:
72102
stage: benchmarks
73103
rules:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
experiments:
2+
- name: Run regression check
3+
steps:
4+
- name: Regression Check
5+
run: fail_on_regression
6+
# Applies on all scenarios
7+
regression_threshold: 10.0 # percents

0 commit comments

Comments
 (0)