Skip to content

ci: introduce SLO based microbenchmark checks #13823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .gitlab/benchmarks/bp-runner.microbenchmarks.fail-on-breach.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Thresholds set based on guidance in https://datadoghq.atlassian.net/wiki/spaces/APMINT/pages/5070193198/How+to+set+up+pre-release+performance+quality+gates#How-to-choose-thresholds-for-pre-release-gates%3F

experiments:
- name: SLO Check
steps:
- name: SLO Check
run: fail_on_breach
warning_range: 7
scenarios:
# flask_simple
- name: flasksimple-tracer
thresholds:
- execution_time < 3.65 ms
- max_rss_usage < 52.50 MB
- name: flasksimple-profiler
thresholds:
- execution_time < 2.10 ms
- max_rss_usage < 43.80 MB
- name: flasksimple-debugger
thresholds:
- execution_time < 2.00 ms
- max_rss_usage < 42.50 MB
- name: flasksimple-iast-get
thresholds:
- execution_time < 2.00 ms
- max_rss_usage < 44.75 MB
- name: flasksimple-appsec-get
thresholds:
- execution_time < 4.75 ms
- max_rss_usage < 62.10 MB
- name: flasksimple-appsec-post
thresholds:
- execution_time < 6.40 ms
- max_rss_usage < 62.40 MB
- name: flasksimple-appsec-telemetry
thresholds:
- execution_time < 4.75 ms
- max_rss_usage < 62.40 MB
4 changes: 2 additions & 2 deletions .gitlab/benchmarks/macrobenchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,12 @@ check-slo-breaches:
expire_in: 3 months
script:
- export ARTIFACTS_DIR="$(pwd)/platform/artifacts/"
- bp-runner .gitlab/benchmarks/bp-runner.fail-on-breach.yml
- bp-runner .gitlab/benchmarks/bp-runner.macrobenchmarks.fail-on-breach.yml

notify-slo-breaches:
extends: .notify-slo-breaches
stage: notify
needs: ["check-slo-breaches"]
when: always
variables:
CHANNEL: "apm-python-release"
CHANNEL: "apm-python-release"
17 changes: 17 additions & 0 deletions .gitlab/benchmarks/microbenchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
stages:
- build
- test
- gate
- report

variables:
Expand Down Expand Up @@ -229,3 +230,19 @@ check-big-regressions:
variables:
# Gitlab and BP specific env vars. Do not modify.
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: dd-trace-py


check-slo-breaches:
stage: gate
when: always
tags: ["arch:amd64"]
image: registry.ddbuild.io/images/benchmarking-platform-tools-ubuntu:latest
artifacts:
name: "artifacts"
when: always
paths:
- artifacts/
expire_in: 3 months
script:
- export ARTIFACTS_DIR="$(pwd)/artifacts/"
- bp-runner .gitlab/benchmarks/bp-runner.microbenchmarks.fail-on-breach.yml
2 changes: 2 additions & 0 deletions .gitlab/download-wheels-from-gh-actions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -eo pipefail

CI_COMMIT_SHA="ee146a2fb353a97e881a07b7cf6f16cc4bbf996c"

if [ -z "$CI_COMMIT_SHA" ]; then
echo "Error: CI_COMMIT_SHA was not provided"
exit 1
Expand Down
Loading