Skip to content

Commit e9d4ce0

Browse files
committed
feat(ci): PR performance gate
1 parent 089cf8f commit e9d4ce0

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.gitlab/benchmarks.yml

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

71+
check-big-regressions:
72+
extends: .benchmarks
73+
needs: [ benchmarks-startup, benchmarks-load, benchmarks-dacapo ]
74+
when: on_success
75+
tags: ["arch:amd64"]
76+
# ARTIFACTS_DIR /go/src/github.com/DataDog/apm-reliability/dd-trace-java/reports/
77+
# need to convert them
78+
script:
79+
- !reference [ .benchmarks, script ]
80+
- echo $(pwd)
81+
- |
82+
for benchmarkType in startup load; do
83+
find "$ARTIFACTS_DIR/$benchmarkType" -name "benchmark-baseline.json" -o -name "benchmark-candidate.json" | while read file; do
84+
relpath="${file#$ARTIFACTS_DIR/$benchmarkType/}"
85+
prefix="${relpath%/benchmark-*}" # Remove the trailing /benchmark-(baseline|candidate).json
86+
prefix="${prefix#./}" # Remove any leading ./
87+
prefix="${prefix//\//-}" # Replace / with -
88+
case "$file" in
89+
*benchmark-baseline.json) type="baseline" ;;
90+
*benchmark-candidate.json) type="candidate" ;;
91+
esac
92+
cp "$file" "$ARTIFACTS_DIR/${type}-${prefix}.json"
93+
done
94+
done
95+
- bp-runner $ARTIFACTS_DIR/../.gitlab/benchmarks/bp-runner.fail-on-regression.yml --debug
96+
7197
.dsm-kafka-benchmarks:
7298
stage: benchmarks
7399
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: 20.0 # percents

0 commit comments

Comments
 (0)