|
1 | | -.benchmarks: |
2 | | - stage: benchmarks |
3 | | - timeout: 1h |
4 | | - tags: ["runner:apm-k8s-tweaked-metal"] |
5 | | - image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-java-benchmarks |
6 | | - needs: [ "build", "publish-artifacts-to-s3" ] |
7 | | - rules: |
8 | | - - if: '$POPULATE_CACHE' |
9 | | - when: never |
10 | | - - if: '$CI_COMMIT_TAG =~ /^v?[0-9]+\.[0-9]+\.[0-9]+$/' |
11 | | - when: manual |
12 | | - allow_failure: true |
13 | | - - if: '$CI_COMMIT_BRANCH == "master"' |
14 | | - when: on_success |
15 | | - interruptible: false |
16 | | - - when: on_success |
17 | | - interruptible: true |
18 | | - script: |
19 | | - - export ARTIFACTS_DIR="$(pwd)/reports" && mkdir -p "${ARTIFACTS_DIR}" |
20 | | - - git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/" |
21 | | - - git clone --branch dd-trace-java/tracer-benchmarks-parallel https://github.com/DataDog/benchmarking-platform.git /platform && cd /platform |
22 | | - artifacts: |
23 | | - name: "reports" |
24 | | - paths: |
25 | | - - reports/ |
26 | | - expire_in: 3 months |
27 | | - variables: |
28 | | - UPSTREAM_PROJECT_ID: $CI_PROJECT_ID # The ID of the current project. This ID is unique across all projects on the GitLab instance. |
29 | | - UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME # "dd-trace-java" |
30 | | - UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME # The branch or tag name for which project is built. |
31 | | - UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA # The commit revision the project is built for. |
32 | | - |
33 | | -benchmarks-startup: |
34 | | - extends: .benchmarks |
35 | | - script: |
36 | | - - !reference [ .benchmarks, script ] |
37 | | - - ./steps/capture-hardware-software-info.sh |
38 | | - - ./steps/run-benchmarks.sh startup |
39 | | - - ./steps/analyze-results.sh startup |
40 | | - |
41 | | -benchmarks-load: |
42 | | - extends: .benchmarks |
43 | | - script: |
44 | | - - !reference [ .benchmarks, script ] |
45 | | - - ./steps/capture-hardware-software-info.sh |
46 | | - - ./steps/run-benchmarks.sh load |
47 | | - - ./steps/analyze-results.sh load |
48 | | - |
49 | | -benchmarks-dacapo: |
50 | | - extends: .benchmarks |
51 | | - script: |
52 | | - - !reference [ .benchmarks, script ] |
53 | | - - ./steps/capture-hardware-software-info.sh |
54 | | - - ./steps/run-benchmarks.sh dacapo |
55 | | - - ./steps/analyze-results.sh dacapo |
56 | | - |
57 | | -benchmarks-post-results: |
58 | | - extends: .benchmarks |
59 | | - tags: ["arch:amd64"] |
60 | | - script: |
61 | | - - !reference [ .benchmarks, script ] |
62 | | - - ./steps/upload-results-to-s3.sh |
63 | | - - ./steps/post-pr-comment.sh |
64 | | - needs: |
65 | | - - job: benchmarks-startup |
66 | | - artifacts: true |
67 | | - - job: benchmarks-load |
68 | | - artifacts: true |
69 | | - - job: benchmarks-dacapo |
70 | | - artifacts: true |
71 | | - |
72 | | -check-big-regressions: |
73 | | - extends: .benchmarks |
74 | | - needs: |
75 | | - - job: benchmarks-startup |
76 | | - artifacts: true |
77 | | - - job: benchmarks-dacapo |
78 | | - artifacts: true |
79 | | - when: on_success |
80 | | - tags: ["arch:amd64"] |
81 | | - rules: |
82 | | - - if: '$POPULATE_CACHE' |
83 | | - when: never |
84 | | - - if: '$CI_COMMIT_BRANCH =~ /backport-pr-/' |
85 | | - when: never |
86 | | - - if: '$CI_COMMIT_BRANCH !~ /^(master|release\/)/' |
87 | | - when: on_success |
88 | | - - when: never |
89 | | - # ARTIFACTS_DIR /go/src/github.com/DataDog/apm-reliability/dd-trace-java/reports/ |
90 | | - # need to convert them |
91 | | - script: |
92 | | - - !reference [ .benchmarks, script ] |
93 | | - - | |
94 | | - for benchmarkType in startup dacapo; do |
95 | | - find "$ARTIFACTS_DIR/$benchmarkType" -name "benchmark-baseline.json" -o -name "benchmark-candidate.json" | while read file; do |
96 | | - relpath="${file#$ARTIFACTS_DIR/$benchmarkType/}" |
97 | | - prefix="${relpath%/benchmark-*}" # Remove the trailing /benchmark-(baseline|candidate).json |
98 | | - prefix="${prefix#./}" # Remove any leading ./ |
99 | | - prefix="${prefix//\//-}" # Replace / with - |
100 | | - case "$file" in |
101 | | - *benchmark-baseline.json) type="baseline" ;; |
102 | | - *benchmark-candidate.json) type="candidate" ;; |
103 | | - esac |
104 | | - echo "Moving $file to $ARTIFACTS_DIR/${type}-${prefix}.converted.json" |
105 | | - cp "$file" "$ARTIFACTS_DIR/${type}-${prefix}.converted.json" |
106 | | - done |
107 | | - done |
108 | | - - bp-runner $CI_PROJECT_DIR/.gitlab/benchmarks/bp-runner.fail-on-regression.yml --debug |
| 1 | +# Insert more benchmark logic here |
109 | 2 |
|
110 | 3 | .dsm-kafka-benchmarks: |
111 | 4 | stage: benchmarks |
|
0 commit comments