|
7 | 7 | # Run every 4 hours |
8 | 8 | - cron: "0 */4 * * *" |
9 | 9 |
|
| 10 | +# Restrict to only running this workflow one at a time. |
| 11 | +# Any new runs will be queued until the previous run is complete. |
| 12 | +# Any existing pending runs will be cancelled and replaced with current run. |
| 13 | +concurrency: |
| 14 | + group: continuous-benchmark |
| 15 | + |
10 | 16 | jobs: |
11 | 17 | runBenchmark: |
12 | 18 | runs-on: ubuntu-latest |
@@ -182,114 +188,9 @@ jobs: |
182 | 188 | env: |
183 | 189 | SLACK_WEBHOOK_URL: ${{ secrets.CI_ALERTS_CHANNEL_WEBHOOK_URL }} |
184 | 190 | SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
185 | | - runLoadTimeBenchmark: |
186 | | - runs-on: ubuntu-latest |
187 | | - needs: runBenchmark |
188 | | - if: ${{ always() }} |
189 | | - steps: |
190 | | - - uses: actions/checkout@v3 |
191 | | - - uses: webfactory/ssh-agent@v0.8.0 |
192 | | - with: |
193 | | - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} |
194 | | - - name: Benches |
195 | | - id: benches |
196 | | - run: | |
197 | | - export HCLOUD_TOKEN=${{ secrets.HCLOUD_TOKEN }} |
198 | | - export POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} |
199 | | - export POSTGRES_HOST=${{ secrets.POSTGRES_HOST }} |
200 | | - export SERVER_NAME="benchmark-server-3" |
201 | | - bash -x tools/setup_ci.sh |
202 | | -
|
203 | | - set +e |
204 | | -
|
205 | | - # Benchmark collection load time |
206 | | - export BENCHMARK_STRATEGY="collection-reload" |
207 | | -
|
208 | | - declare -A DATASET_TO_ENGINE |
209 | | - declare -A DATASET_TO_URL |
210 | | - DATASET_TO_ENGINE["all-payloads-default"]="qdrant-continuous-benchmark-snapshot" |
211 | | - DATASET_TO_ENGINE["all-payloads-on-disk"]="qdrant-continuous-benchmark-snapshot" |
212 | | - DATASET_TO_ENGINE["all-payloads-default-sparse"]="qdrant-continuous-benchmark-snapshot" |
213 | | - DATASET_TO_ENGINE["all-payloads-on-disk-sparse"]="qdrant-continuous-benchmark-snapshot" |
214 | | -
|
215 | | - export STORAGE_URL="https://storage.googleapis.com/qdrant-benchmark-snapshots/all-payloads" |
216 | | - DATASET_TO_URL["all-payloads-default"]="${STORAGE_URL}/benchmark-all-payloads-500k-768-default.snapshot" |
217 | | - DATASET_TO_URL["all-payloads-on-disk"]="${STORAGE_URL}/benchmark-all-payloads-500k-768-on-disk.snapshot" |
218 | | - DATASET_TO_URL["all-payloads-default-sparse"]="${STORAGE_URL}/benchmark-all-payloads-500k-sparse-default.snapshot" |
219 | | - DATASET_TO_URL["all-payloads-on-disk-sparse"]="${STORAGE_URL}/benchmark-all-payloads-500k-sparse-on-disk.snapshot" |
220 | | -
|
221 | | - set +e |
222 | | -
|
223 | | - for dataset in "${!DATASET_TO_ENGINE[@]}"; do |
224 | | - export ENGINE_NAME=${DATASET_TO_ENGINE[$dataset]} |
225 | | - export DATASETS=$dataset |
226 | | - export SNAPSHOT_URL=${DATASET_TO_URL[$dataset]} |
227 | | -
|
228 | | - # Benchmark the dev branch: |
229 | | - export QDRANT_VERSION=ghcr/dev |
230 | | - timeout 30m bash -x tools/run_ci.sh |
231 | | -
|
232 | | - # Benchmark the master branch: |
233 | | - export QDRANT_VERSION=docker/master |
234 | | - timeout 30m bash -x tools/run_ci.sh |
235 | | - done |
236 | | -
|
237 | | - set -e |
238 | | - - name: Fail job if any of the benches failed |
239 | | - if: steps.benches.outputs.failed == 'error' || steps.benches.outputs.failed == 'timeout' |
240 | | - run: exit 1 |
241 | | - - name: Send Notification |
242 | | - if: failure() || cancelled() |
243 | | - uses: slackapi/slack-github-action@v1.26.0 |
244 | | - with: |
245 | | - payload: | |
246 | | - { |
247 | | - "text": "CI benchmarks (runLoadTimeBenchmark) run status: ${{ job.status }}", |
248 | | - "blocks": [ |
249 | | - { |
250 | | - "type": "section", |
251 | | - "text": { |
252 | | - "type": "mrkdwn", |
253 | | - "text": "CI benchmarks (runLoadTimeBenchmark) failed because of *${{ steps.benches.outputs.failed }}*." |
254 | | - } |
255 | | - }, |
256 | | - { |
257 | | - "type": "section", |
258 | | - "text": { |
259 | | - "type": "mrkdwn", |
260 | | - "text": "Qdrant version: *${{ steps.benches.outputs.qdrant_version }}*." |
261 | | - } |
262 | | - }, |
263 | | - { |
264 | | - "type": "section", |
265 | | - "text": { |
266 | | - "type": "mrkdwn", |
267 | | - "text": "Engine: *${{ steps.benches.outputs.engine_name }}*." |
268 | | - } |
269 | | - }, |
270 | | - { |
271 | | - "type": "section", |
272 | | - "text": { |
273 | | - "type": "mrkdwn", |
274 | | - "text": "Dataset: *${{ steps.benches.outputs.dataset }}*." |
275 | | - } |
276 | | - }, |
277 | | - { |
278 | | - "type": "section", |
279 | | - "text": { |
280 | | - "type": "mrkdwn", |
281 | | - "text": "View the results <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>" |
282 | | - } |
283 | | - } |
284 | | - ] |
285 | | - } |
286 | | - env: |
287 | | - SLACK_WEBHOOK_URL: ${{ secrets.CI_ALERTS_CHANNEL_WEBHOOK_URL }} |
288 | | - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
289 | | - |
290 | 191 | runParallelBenchmark: |
291 | 192 | runs-on: ubuntu-latest |
292 | | - needs: [ runLoadTimeBenchmark, runTenantsBenchmark ] |
| 193 | + needs: runTenantsBenchmark |
293 | 194 | if: ${{ always() }} |
294 | 195 | steps: |
295 | 196 | - uses: actions/checkout@v3 |
|
0 commit comments