Skip to content

Commit 577cd4a

Browse files
committed
test: run new bench in CI
1 parent f487c76 commit 577cd4a

File tree

5 files changed

+88
-9
lines changed

5 files changed

+88
-9
lines changed

.evergreen/config.in.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ functions:
142142
working_dir: "src"
143143
timeout_secs: 300
144144
binary: bash
145-
args:
145+
args:
146146
- .evergreen/run-tests.sh
147147

148148
"run serverless tests":
@@ -158,11 +158,11 @@ functions:
158158
timeout_secs: 300
159159
working_dir: src
160160
binary: bash
161-
env:
161+
env:
162162
AUTH: 'auth'
163163
SSL: 'ssl'
164164
add_expansions_to_env: true
165-
args:
165+
args:
166166
- .evergreen/run-serverless-tests.sh
167167

168168
"start-load-balancer":
@@ -947,6 +947,23 @@ functions:
947947
binary: bash
948948
args:
949949
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
950+
951+
# TEMP!
952+
"run new spec driver benchmarks":
953+
- command: subprocess.exec
954+
type: test
955+
params:
956+
working_dir: "src"
957+
env:
958+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
959+
MONGODB_URI: ${MONGODB_URI}
960+
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
961+
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
962+
NEW_BENCH: "true"
963+
binary: bash
964+
args:
965+
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
966+
950967
"run x509 auth tests":
951968
- command: subprocess.exec
952969
type: test
@@ -1256,7 +1273,7 @@ task_groups:
12561273
binary: bash
12571274
args:
12581275
- ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh
1259-
1276+
12601277
tasks:
12611278
- ".serverless"
12621279

.evergreen/config.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,20 @@ functions:
895895
binary: bash
896896
args:
897897
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
898+
run new spec driver benchmarks:
899+
- command: subprocess.exec
900+
type: test
901+
params:
902+
working_dir: src
903+
env:
904+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
905+
MONGODB_URI: ${MONGODB_URI}
906+
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
907+
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
908+
NEW_BENCH: 'true'
909+
binary: bash
910+
args:
911+
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
898912
run x509 auth tests:
899913
- command: subprocess.exec
900914
type: test
@@ -3375,6 +3389,24 @@ tasks:
33753389
- command: perf.send
33763390
params:
33773391
file: src/results.json
3392+
- name: run-spec-benchmark-tests-node-server-new
3393+
tags:
3394+
- run-spec-benchmark-tests
3395+
- performance
3396+
exec_timeout_secs: 3600
3397+
commands:
3398+
- command: expansions.update
3399+
type: setup
3400+
params:
3401+
updates:
3402+
- {key: NODE_LTS_VERSION, value: v22.11.0}
3403+
- {key: VERSION, value: v6.0-perf}
3404+
- {key: TOPOLOGY, value: server}
3405+
- {key: AUTH, value: noauth}
3406+
- {key: MONGODB_CLIENT_OPTIONS, value: undefined}
3407+
- func: install dependencies
3408+
- func: bootstrap mongo-orchestration
3409+
- func: run new spec driver benchmarks
33783410
- name: run-unit-tests-node-16
33793411
tags:
33803412
- unit-tests
@@ -5192,6 +5224,7 @@ buildvariants:
51925224
- run-spec-benchmark-tests-node-server-timeoutMS-0
51935225
- run-spec-benchmark-tests-node-server-monitorCommands-true
51945226
- run-spec-benchmark-tests-node-server-logging
5227+
- run-spec-benchmark-tests-node-server-new
51955228
- name: rhel8-custom-dependency-tests
51965229
display_name: Custom Dependency Version Test
51975230
run_on: rhel80-large

.evergreen/generate_evergreen_tasks.js

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ TASKS.push(
212212
{ func: 'run socks5 tests' }
213213
]
214214
}
215-
]
215+
]
216216
);
217217

218218
TASKS.push({
@@ -432,8 +432,8 @@ for (const {
432432
const expansions = { NODE_LTS_VERSION, NPM_VERSION };
433433
const taskNames = tasks.map(({ name }) => name);
434434

435-
expansions.CLIENT_ENCRYPTION = String(!!clientEncryption)
436-
expansions.TEST_CSFLE = expansions.CLIENT_ENCRYPTION
435+
expansions.CLIENT_ENCRYPTION = String(!!clientEncryption);
436+
expansions.TEST_CSFLE = expansions.CLIENT_ENCRYPTION;
437437

438438
BUILD_VARIANTS.push({ name, display_name, run_on, expansions, tasks: taskNames });
439439
}
@@ -752,6 +752,28 @@ function addPerformanceTasks() {
752752
]
753753
});
754754

755+
// temp
756+
const makePerfTaskNEW = (name, MONGODB_CLIENT_OPTIONS) => ({
757+
name,
758+
tags: ['run-spec-benchmark-tests', 'performance'],
759+
exec_timeout_secs: 3600,
760+
commands: [
761+
updateExpansions({
762+
NODE_LTS_VERSION: 'v22.11.0',
763+
VERSION: 'v6.0-perf',
764+
TOPOLOGY: 'server',
765+
AUTH: 'noauth',
766+
MONGODB_CLIENT_OPTIONS: JSON.stringify(MONGODB_CLIENT_OPTIONS)
767+
}),
768+
...[
769+
'install dependencies',
770+
'bootstrap mongo-orchestration',
771+
'run new spec driver benchmarks'
772+
].map(func => ({ func }))
773+
// No perf send! just testing
774+
]
775+
});
776+
755777
const tasks = [
756778
makePerfTask('run-spec-benchmark-tests-node-server', {}),
757779
makePerfTask('run-spec-benchmark-tests-node-server-timeoutMS-120000', { timeoutMS: 120000 }),
@@ -762,7 +784,8 @@ function addPerformanceTasks() {
762784
makePerfTask('run-spec-benchmark-tests-node-server-logging', {
763785
mongodbLogPath: 'stderr',
764786
mongodbLogComponentSeverities: { default: 'trace' }
765-
})
787+
}),
788+
makePerfTaskNEW('run-spec-benchmark-tests-node-server-new')
766789
];
767790

768791
TASKS.push(...tasks);

.evergreen/run-benchmarks.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ export MONGODB_CLIENT_OPTIONS=$MONGODB_CLIENT_OPTIONS
1111

1212
npm run build:ts
1313

14+
if [[ "${NEW_BENCH:-}" == "true" ]]; then
15+
pushd test/benchmarks/driver_bench
16+
npm start
17+
popd
18+
exit 0
19+
fi
1420

1521
# If MONGODB_CLIENT_OPTIONS contains mongodbLogComponentSeverities redirect stderr to a file
1622
if [[ $MONGODB_CLIENT_OPTIONS == *"mongodbLogComponentSeverities"* ]]; then

test/benchmarks/driver_bench/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"scripts": {
55
"prestart": "tsc",
6-
"start": "node lib/main.js"
6+
"start": "node lib/main.mjs"
77
},
88
"devDependencies": {
99
"@types/node": "^22.13.0"

0 commit comments

Comments
 (0)