|
| 1 | +include: |
| 2 | + project: 'DataDog/benchmarking-platform-tools' |
| 3 | + file: 'images/templates/gitlab/notify-slo-breaches.template.yml' |
| 4 | + ref: '925e0a3e7dd628885f6fc69cdaea5c8cc9e212bc' |
| 5 | + |
1 | 6 | .macrobenchmarks:
|
2 | 7 | stage: macrobenchmarks
|
3 | 8 | rules:
|
@@ -68,3 +73,66 @@ otel-latest:
|
68 | 73 | BP_BENCHMARKS_CONFIGURATION: otel-latest
|
69 | 74 | TRACER_OPTS: -javaagent:/app/otel-java-agent.jar -Ddd.env=otel-latest -Ddd.service=bp-java-petclinic
|
70 | 75 | 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