Skip to content

Commit f391147

Browse files
committed
Use apm-sdks-benchmarks macrobenchmarks
1 parent 1c2d839 commit f391147

File tree

2 files changed

+5
-146
lines changed

2 files changed

+5
-146
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ stages:
1010
- publish
1111
- shared-pipeline
1212
- benchmarks
13-
- macrobenchmarks
13+
- java-spring-petclinic-macrobenchmarks
1414
- tests
1515
- exploration-tests
1616
- ci-visibility-tests

.gitlab/macrobenchmarks.yml

Lines changed: 4 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -1,146 +1,5 @@
1+
# macrobenchmarks are located in the `apm-sdks-benchmarks` repository.
12
include:
2-
- project: 'DataDog/benchmarking-platform-tools'
3-
file: 'images/templates/gitlab/notify-slo-breaches.template.yml'
4-
- project: 'DataDog/benchmarking-platform-tools'
5-
file: 'images/templates/gitlab/check-slo-breaches.template.yml'
6-
7-
.macrobenchmarks:
8-
stage: macrobenchmarks
9-
rules:
10-
- if: $POPULATE_CACHE
11-
when: never
12-
- if: ($NIGHTLY_BENCHMARKS || $CI_PIPELINE_SOURCE != "schedule") && $CI_COMMIT_REF_NAME == "master"
13-
when: always
14-
interruptible: false
15-
- when: manual
16-
interruptible: true
17-
allow_failure: true
18-
tags: ["runner:apm-k8s-same-cpu"]
19-
needs: ["build"]
20-
timeout: 1h
21-
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-java-petclinic
22-
script:
23-
- git clone --branch java/petclinic https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform platform && cd platform
24-
- ./steps/run-benchmarks.sh
25-
artifacts:
26-
name: "artifacts"
27-
when: always
28-
paths:
29-
- platform/artifacts/
30-
expire_in: 3 months
31-
variables:
32-
K6_OPTIONS_WARMUP_RATE: 2000
33-
K6_OPTIONS_WARMUP_DURATION: 5m
34-
K6_OPTIONS_WARMUP_GRACEFUL_STOP: 10s
35-
K6_OPTIONS_WARMUP_PRE_ALLOCATED_VUS: 4
36-
K6_OPTIONS_WARMUP_MAX_VUS: 4
37-
38-
K6_OPTIONS_NORMAL_OPERATION_RATE: 1500
39-
K6_OPTIONS_NORMAL_OPERATION_DURATION: 10m
40-
K6_OPTIONS_NORMAL_OPERATION_GRACEFUL_STOP: 10s
41-
K6_OPTIONS_NORMAL_OPERATION_PRE_ALLOCATED_VUS: 4
42-
K6_OPTIONS_NORMAL_OPERATION_MAX_VUS: 4
43-
44-
K6_OPTIONS_HIGH_LOAD_RATE: 4000
45-
K6_OPTIONS_HIGH_LOAD_DURATION: 5m
46-
K6_OPTIONS_HIGH_LOAD_GRACEFUL_STOP: 10s
47-
K6_OPTIONS_HIGH_LOAD_PRE_ALLOCATED_VUS: 4
48-
K6_OPTIONS_HIGH_LOAD_MAX_VUS: 4
49-
retry:
50-
max: 2
51-
when:
52-
- unknown_failure
53-
- data_integrity_failure
54-
- runner_system_failure
55-
- scheduler_failure
56-
- api_failure
57-
58-
baseline:
59-
extends: .macrobenchmarks
60-
variables:
61-
BP_BENCHMARKS_CONFIGURATION: baseline
62-
TRACER_OPTS: -Ddd.service=bp-java-petclinic
63-
JAVA_OPTS: -javaagent:/app/memcheck/stability-testing-memwatch.jar -Xmx128M
64-
65-
only-tracing:
66-
extends: .macrobenchmarks
67-
variables:
68-
BP_BENCHMARKS_CONFIGURATION: only-tracing
69-
TRACER_OPTS: -javaagent:/app/dd-java-agent.jar -Ddd.env=${BP_BENCHMARKS_CONFIGURATION} -Ddd.service=bp-java-petclinic
70-
JAVA_OPTS: -javaagent:/app/memcheck/stability-testing-memwatch.jar -Xmx128M
71-
72-
otel-latest:
73-
extends: .macrobenchmarks
74-
variables:
75-
BP_BENCHMARKS_CONFIGURATION: otel-latest
76-
TRACER_OPTS: -javaagent:/app/otel-java-agent.jar -Ddd.env=otel-latest -Ddd.service=bp-java-petclinic
77-
JAVA_OPTS: -javaagent:/app/memcheck/stability-testing-memwatch.jar -Xmx128M
78-
79-
80-
check-slo-breaches:
81-
extends: .check-slo-breaches
82-
stage: macrobenchmarks
83-
interruptible: true
84-
rules:
85-
- if: $POPULATE_CACHE
86-
when: never
87-
- when: on_success
88-
needs:
89-
- job: baseline
90-
artifacts: true
91-
- job: only-tracing
92-
artifacts: true
93-
- job: otel-latest
94-
artifacts: true
95-
- job: benchmarks-startup
96-
artifacts: true
97-
- job: benchmarks-load
98-
artifacts: true
99-
- job: benchmarks-dacapo
100-
artifacts: true
101-
script:
102-
# macrobenchmarks are located here, files are already in "converted" format
103-
- export ARTIFACTS_DIR="$(pwd)/platform/artifacts/" && mkdir -p "${ARTIFACTS_DIR}"
104-
105-
# Need to move the artifacts the benchmarks-* job
106-
- |
107-
export BENCHMARKS_ARTIFACTS_DIR="$(pwd)/reports" && mkdir -p "${BENCHMARKS_ARTIFACTS_DIR}"
108-
for benchmarkType in startup load dacapo; do
109-
find "$BENCHMARKS_ARTIFACTS_DIR/$benchmarkType" -name "benchmark-baseline.json" -o -name "benchmark-candidate.json" | while read file; do
110-
relpath="${file#$BENCHMARKS_ARTIFACTS_DIR/$benchmarkType/}"
111-
prefix="${relpath%/benchmark-*}" # Remove the trailing /benchmark-(baseline|candidate).json
112-
prefix="${prefix#./}" # Remove any leading ./
113-
prefix="${prefix//\//-}" # Replace / with -
114-
case "$file" in
115-
*benchmark-baseline.json) type="baseline" ;;
116-
*benchmark-candidate.json) type="candidate" ;;
117-
esac
118-
echo "Moving $file to $ARTIFACTS_DIR/${type}-${benchmarkType}-${prefix}.converted.json"
119-
cp "$file" "$ARTIFACTS_DIR/${type}-${benchmarkType}-${prefix}.converted.json"
120-
done
121-
done
122-
- ls -lah "$ARTIFACTS_DIR"
123-
- bp-runner .gitlab/benchmarks/bp-runner.fail-on-breach.yml
124-
artifacts:
125-
name: "artifacts"
126-
when: always
127-
paths:
128-
- platform/artifacts/
129-
expire_in: 1 week
130-
variables:
131-
DDOCTOSTS_POLICY: "self.gitlab.github-access.read"
132-
UPSTREAM_PROJECT_ID: $CI_PROJECT_ID # The ID of the current project. This ID is unique across all projects on the GitLab instance.
133-
UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME # "dd-trace-java"
134-
UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME # The branch or tag name for which project is built.
135-
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA # The commit revision the project is built for.
136-
137-
notify-slo-breaches:
138-
extends: .notify-slo-breaches
139-
stage: macrobenchmarks
140-
needs: ["check-slo-breaches"]
141-
rules:
142-
- if: $POPULATE_CACHE
143-
when: never
144-
- when: always
145-
variables:
146-
CHANNEL: "apm-java"
3+
- project: 'DataDog/apm-reliability/apm-sdks-benchmarks'
4+
file: '.gitlab/ci-java-spring-petclinic.yml'
5+
ref: 'sarahchen6/migrate-java-macrobenchmarks'

0 commit comments

Comments
 (0)