Skip to content

Commit e731096

Browse files
Stephen Belangerddyurchenko
Stephen Belanger
andauthored
Add js hapi macrobenchmark (#4407)
* Add JS Hapi macrobenchmark * Specify dd-trace-js version via DDTRACE_INSTALL_VERSION * Fix branch name * Tweak RPS * Tweak benchmark duration * Repeatability testing * Add retries on Gitlab internal system failures, tweak RPS * Keep only 2 variants for a moment --------- Co-authored-by: Dmytro Yurchenko <[email protected]>
1 parent 5be6314 commit e731096

File tree

3 files changed

+73
-4
lines changed

3 files changed

+73
-4
lines changed

.gitlab-ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ stages:
55
- benchmarks-pr-comment
66
- single-step-instrumentation-tests
77
- manual_images
8+
- macrobenchmarks
89

910
include:
1011
- remote: https://gitlab-templates.ddbuild.io/apm/packaging.yml
1112
- local: ".gitlab/benchmarks.yml"
1213
- local: ".gitlab/single-step-instrumentation-tests.yml"
14+
- local: ".gitlab/macrobenchmarks.yml"
1315

1416
variables:
1517

.gitlab/benchmarks.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
variables:
2-
BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-js
2+
MICROBENCHMARKS_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-js
33
SLS_CI_IMAGE: registry.ddbuild.io/ci/serverless-tools:1
44

55
# Benchmark's env variables. Modify to tweak benchmark parameters.
@@ -10,7 +10,7 @@ variables:
1010
stage: benchmarks
1111
when: on_success
1212
tags: ["runner:apm-k8s-tweaked-metal"]
13-
image: $BASE_CI_IMAGE
13+
image: $MICROBENCHMARKS_CI_IMAGE
1414
interruptible: true
1515
timeout: 15m
1616
script:
@@ -31,7 +31,7 @@ benchmarks-pr-comment:
3131
stage: benchmarks-pr-comment
3232
when: on_success
3333
tags: ["arch:amd64"]
34-
image: $BASE_CI_IMAGE
34+
image: $MICROBENCHMARKS_CI_IMAGE
3535
script:
3636
- cd platform && (git init && git remote add origin https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform && git pull origin dd-trace-js)
3737
- bp-runner bp-runner.pr-comment.yml --debug
@@ -44,7 +44,7 @@ check-big-regressions:
4444
stage: benchmarks-pr-comment
4545
when: on_success
4646
tags: ["arch:amd64"]
47-
image: $BASE_CI_IMAGE
47+
image: $MICROBENCHMARKS_CI_IMAGE
4848
script:
4949
- cd platform && (git init && git remote add origin https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform && git pull origin dd-trace-js)
5050
- bp-runner bp-runner.fail-on-regression.yml --debug

.gitlab/macrobenchmarks.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
.macrobenchmarks:
2+
stage: macrobenchmarks
3+
rules:
4+
- if: ($NIGHTLY_BENCHMARKS || $CI_PIPELINE_SOURCE != "schedule") && $CI_COMMIT_REF_NAME == "master"
5+
when: always
6+
- when: manual
7+
tags: ["runner:apm-k8s-same-cpu"]
8+
needs: []
9+
interruptible: true
10+
timeout: 1h
11+
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:js-hapi
12+
script:
13+
- git clone --branch js/hapi https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform platform && cd platform
14+
- bp-runner bp-runner.yml --debug -t
15+
artifacts:
16+
name: "artifacts"
17+
when: always
18+
paths:
19+
- platform/artifacts/
20+
expire_in: 3 months
21+
variables:
22+
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true"
23+
24+
K6_OPTIONS_WARMUP_RATE: 500
25+
K6_OPTIONS_WARMUP_DURATION: 1m
26+
K6_OPTIONS_WARMUP_GRACEFUL_STOP: 10s
27+
K6_OPTIONS_WARMUP_PRE_ALLOCATED_VUS: 4
28+
K6_OPTIONS_WARMUP_MAX_VUS: 4
29+
30+
K6_OPTIONS_NORMAL_OPERATION_RATE: 300
31+
K6_OPTIONS_NORMAL_OPERATION_DURATION: 10m
32+
K6_OPTIONS_NORMAL_OPERATION_GRACEFUL_STOP: 10s
33+
K6_OPTIONS_NORMAL_OPERATION_PRE_ALLOCATED_VUS: 4
34+
K6_OPTIONS_NORMAL_OPERATION_MAX_VUS: 4
35+
36+
K6_OPTIONS_HIGH_LOAD_RATE: 700
37+
K6_OPTIONS_HIGH_LOAD_DURATION: 3m
38+
K6_OPTIONS_HIGH_LOAD_GRACEFUL_STOP: 10s
39+
K6_OPTIONS_HIGH_LOAD_PRE_ALLOCATED_VUS: 4
40+
K6_OPTIONS_HIGH_LOAD_MAX_VUS: 4
41+
42+
DDTRACE_INSTALL_VERSION: "git://github.com/Datadog/dd-trace-js.git#${CI_COMMIT_SHA}"
43+
44+
# Workaround: Currently we're not running the benchmarks on every PR, but GitHub still shows them as pending.
45+
# By marking the benchmarks as allow_failure, this should go away. (This workaround should be removed once the
46+
# benchmarks get changed to run on every PR)
47+
allow_failure: true
48+
49+
# Retry on Gitlab internal system failures
50+
retry:
51+
max: 2
52+
when:
53+
- unknown_failure
54+
- data_integrity_failure
55+
- runner_system_failure
56+
- scheduler_failure
57+
- api_failure
58+
59+
baseline:
60+
extends: .macrobenchmarks
61+
variables:
62+
DD_BENCHMARKS_CONFIGURATION: baseline
63+
64+
only-tracing:
65+
extends: .macrobenchmarks
66+
variables:
67+
DD_BENCHMARKS_CONFIGURATION: only-tracing

0 commit comments

Comments
 (0)