Skip to content

Commit 4e4c286

Browse files
bric3ddyurchenko
andauthored
Performance release gate (#9068)
* chore(ci): Basic slo breach prototype * chore(ci): PR review * chore: Collect reports from benchmarks * tweak: Include benchmarkType in file name * tweak: Store artifacts that were used for checking regression, so we can debug * chore(ci): Tweak thresholds * chore(ci): Tweak to recommended thresholds See https://github.com/DataDog/dd-trace-java/pull/9068/files#r2210474360 * chore(ci): Another tweak to recommended thresholds See https://github.com/DataDog/dd-trace-java/pull/9068/files#r2210474360 * chore(ci): Revert hack to run the release gate (it needed the all macrobenchmarks) --------- Co-authored-by: Dmytro Yurchenko <[email protected]> Co-authored-by: Dmytro Yurchenko <[email protected]>
1 parent ca2caa8 commit 4e4c286

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Thresholds set based on guidance in https://datadoghq.atlassian.net/wiki/x/LgI1LgE#How-to-choose-thresholds-for-pre-release-gates%3F
2+
3+
experiments:
4+
- name: Run SLO breach check
5+
steps:
6+
- name: SLO breach check
7+
run: fail_on_breach
8+
# https://datadoghq.atlassian.net/wiki/x/LgI1LgE#How-to-choose-a-warning-range-for-pre-release-gates%3F
9+
warning_range: 10
10+
# File spec
11+
# https://datadoghq.atlassian.net/wiki/x/LgI1LgE#Specification
12+
# Measurements
13+
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario
14+
scenarios:
15+
# Note that thresholds there are choosen based the confidence interval with a 10% adjustment.
16+
17+
# Standard macrobenchmarks
18+
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario&scenario=normal_operation%2Fonly-tracing&trendsType=scenario
19+
- name: normal_operation/only-tracing
20+
thresholds:
21+
- agg_http_req_duration_p50 < 2.6 ms
22+
- agg_http_req_duration_p99 < 8.5 ms
23+
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario&scenario=normal_operation%2Fotel-latest&trendsType=scenario
24+
- name: normal_operation/otel-latest
25+
thresholds:
26+
- agg_http_req_duration_p50 < 2.5 ms
27+
- agg_http_req_duration_p99 < 10 ms
28+
29+
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario&scenario=high_load%2Fonly-tracing&trendsType=scenario
30+
- name: high_load/only-tracing
31+
thresholds:
32+
- throughput > 1100.0 op/s
33+
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario&scenario=high_load%2Fotel-latest&trendsType=scenario
34+
- name: high_load/otel-latest
35+
thresholds:
36+
- throughput > 1100.0 op/s
37+
38+
# Startup macrobenchmarks
39+
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario&scenario=startup%3Apetclinic%3Atracing%3AGlobalTracer&trendsType=scenario
40+
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario&scenario=startup%3Apetclinic%3Aappsec%3AGlobalTracer&trendsType=scenario
41+
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario&scenario=startup%3Apetclinic%3Aiast%3AGlobalTracer&trendsType=scenario
42+
- name: "startup:petclinic:(tracing|appsec|iast):GlobalTracer"
43+
thresholds:
44+
- execution_time < 280 ms
45+
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario&scenario=startup%3Apetclinic%3Aprofiling%3AGlobalTracer&trendsType=scenario
46+
- name: "startup:petclinic:profiling:GlobalTracer"
47+
thresholds:
48+
- execution_time < 420 ms

.gitlab/macrobenchmarks.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
include:
2+
project: 'DataDog/benchmarking-platform-tools'
3+
file: 'images/templates/gitlab/notify-slo-breaches.template.yml'
4+
ref: '925e0a3e7dd628885f6fc69cdaea5c8cc9e212bc'
5+
16
.macrobenchmarks:
27
stage: macrobenchmarks
38
rules:
@@ -68,3 +73,66 @@ otel-latest:
6873
BP_BENCHMARKS_CONFIGURATION: otel-latest
6974
TRACER_OPTS: -javaagent:/app/otel-java-agent.jar -Ddd.env=otel-latest -Ddd.service=bp-java-petclinic
7075
JAVA_OPTS: -javaagent:/app/memcheck/stability-testing-memwatch.jar -Xmx128M
76+
77+
78+
check-slo-breaches:
79+
stage: macrobenchmarks
80+
interruptible: true
81+
tags: ["arch:amd64"]
82+
image: registry.ddbuild.io/images/benchmarking-platform-tools-ubuntu:latest
83+
when: on_success
84+
needs:
85+
- job: baseline
86+
artifacts: true
87+
- job: only-tracing
88+
artifacts: true
89+
- job: otel-latest
90+
artifacts: true
91+
- job: benchmarks-startup
92+
artifacts: true
93+
- job: benchmarks-load
94+
artifacts: true
95+
- job: benchmarks-dacapo
96+
artifacts: true
97+
script:
98+
# macrobenchmarks are located here, files are already in "converted" format
99+
- export ARTIFACTS_DIR="$(pwd)/platform/artifacts/" && mkdir -p "${ARTIFACTS_DIR}"
100+
101+
# Need to move the artifacts the benchmarks-* job
102+
- |
103+
export BENCHMARKS_ARTIFACTS_DIR="$(pwd)/reports" && mkdir -p "${BENCHMARKS_ARTIFACTS_DIR}"
104+
for benchmarkType in startup load dacapo; do
105+
find "$BENCHMARKS_ARTIFACTS_DIR/$benchmarkType" -name "benchmark-baseline.json" -o -name "benchmark-candidate.json" | while read file; do
106+
relpath="${file#$BENCHMARKS_ARTIFACTS_DIR/$benchmarkType/}"
107+
prefix="${relpath%/benchmark-*}" # Remove the trailing /benchmark-(baseline|candidate).json
108+
prefix="${prefix#./}" # Remove any leading ./
109+
prefix="${prefix//\//-}" # Replace / with -
110+
case "$file" in
111+
*benchmark-baseline.json) type="baseline" ;;
112+
*benchmark-candidate.json) type="candidate" ;;
113+
esac
114+
echo "Moving $file to $ARTIFACTS_DIR/${type}-${benchmarkType}-${prefix}.converted.json"
115+
cp "$file" "$ARTIFACTS_DIR/${type}-${benchmarkType}-${prefix}.converted.json"
116+
done
117+
done
118+
- ls -lah "$ARTIFACTS_DIR"
119+
- bp-runner .gitlab/benchmarks/bp-runner.fail-on-breach.yml
120+
artifacts:
121+
name: "artifacts"
122+
when: always
123+
paths:
124+
- platform/artifacts/
125+
expire_in: 1 week
126+
variables:
127+
UPSTREAM_PROJECT_ID: $CI_PROJECT_ID # The ID of the current project. This ID is unique across all projects on the GitLab instance.
128+
UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME # "dd-trace-java"
129+
UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME # The branch or tag name for which project is built.
130+
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA # The commit revision the project is built for.
131+
132+
notify-slo-breaches:
133+
extends: .notify-slo-breaches
134+
stage: macrobenchmarks
135+
needs: ["check-slo-breaches"]
136+
when: always
137+
variables:
138+
CHANNEL: "apm-release-platform"

0 commit comments

Comments
 (0)