Skip to content

Commit 7bfce01

Browse files
authored
chore(NODE-6729): move to new benchmark runner (#4405)
1 parent 74281a5 commit 7bfce01

File tree

173 files changed

+29
-1480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+29
-1480
lines changed

.evergreen/config.in.yml

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ command_type: system
1111
# Protect ourself against rogue test case, or curl gone wild, that runs forever
1212
# Good rule of thumb: the averageish length a task takes, times 5
1313
# That roughly accounts for variable system performance for various buildvariants
14-
exec_timeout_secs: 2100
14+
exec_timeout_secs: 7200
1515

1616
# What to do when evergreen hits the timeout (`post:` tasks are run automatically)
1717
timeout:
@@ -474,7 +474,7 @@ functions:
474474
AWS_CREDENTIAL_TYPE: regular
475475
working_dir: "src"
476476
binary: bash
477-
args:
477+
args:
478478
- .evergreen/run-mongodb-aws-test.sh
479479

480480
"run aws auth test with assume role credentials":
@@ -489,7 +489,7 @@ functions:
489489
AWS_CREDENTIAL_TYPE: assume-role
490490
working_dir: "src"
491491
binary: bash
492-
args:
492+
args:
493493
- .evergreen/run-mongodb-aws-test.sh
494494

495495
"run aws auth test with aws EC2 credentials":
@@ -520,7 +520,7 @@ functions:
520520
AWS_CREDENTIAL_TYPE: env-creds
521521
working_dir: "src"
522522
binary: bash
523-
args:
523+
args:
524524
- .evergreen/run-mongodb-aws-test.sh
525525

526526
"run aws auth test with aws credentials and session token as environment variables":
@@ -535,7 +535,7 @@ functions:
535535
AWS_CREDENTIAL_TYPE: session-creds
536536
working_dir: "src"
537537
binary: bash
538-
args:
538+
args:
539539
- .evergreen/run-mongodb-aws-test.sh
540540

541541
"run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME set":
@@ -551,7 +551,7 @@ functions:
551551
AWS_ROLE_SESSION_NAME: test
552552
working_dir: "src"
553553
binary: bash
554-
args:
554+
args:
555555
- .evergreen/run-mongodb-aws-test.sh
556556

557557
"run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME unset":
@@ -566,7 +566,7 @@ functions:
566566
AWS_CREDENTIAL_TYPE: web-identity
567567
working_dir: "src"
568568
binary: bash
569-
args:
569+
args:
570570
- .evergreen/run-mongodb-aws-test.sh
571571

572572
"run aws ECS auth test":
@@ -582,9 +582,9 @@ functions:
582582
AWS_CREDENTIAL_TYPE: web-identity
583583
working_dir: "src"
584584
binary: bash
585-
args:
585+
args:
586586
- .evergreen/prepare-mongodb-aws-ecs-auth.sh
587-
587+
588588
"run custom csfle tests":
589589
- command: subprocess.exec
590590
type: test
@@ -620,7 +620,7 @@ functions:
620620
MONGODB_AWS_SDK: 'true'
621621
working_dir: "src"
622622
binary: bash
623-
args:
623+
args:
624624
- .evergreen/run-lambda-aws-tests.sh
625625

626626
"upload test results":
@@ -708,22 +708,6 @@ functions:
708708
args:
709709
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
710710

711-
# TODO(NODE-6729): Remove this task when the original tasks are using the new runner
712-
"run new spec driver benchmarks":
713-
- command: subprocess.exec
714-
type: test
715-
params:
716-
working_dir: "src"
717-
env:
718-
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
719-
MONGODB_URI: ${MONGODB_URI}
720-
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
721-
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
722-
NEW_BENCH: "true"
723-
binary: bash
724-
args:
725-
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
726-
727711
"run x509 auth tests":
728712
- command: subprocess.exec
729713
type: test

.evergreen/config.yml

Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
stepback: true
22
command_type: system
3-
exec_timeout_secs: 2100
3+
exec_timeout_secs: 7200
44
timeout:
55
- command: subprocess.exec
66
params:
@@ -633,20 +633,6 @@ functions:
633633
binary: bash
634634
args:
635635
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
636-
run new spec driver benchmarks:
637-
- command: subprocess.exec
638-
type: test
639-
params:
640-
working_dir: src
641-
env:
642-
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
643-
MONGODB_URI: ${MONGODB_URI}
644-
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
645-
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
646-
NEW_BENCH: 'true'
647-
binary: bash
648-
args:
649-
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
650636
run x509 auth tests:
651637
- command: subprocess.exec
652638
type: test
@@ -2918,7 +2904,7 @@ tasks:
29182904
tags:
29192905
- run-spec-benchmark-tests
29202906
- performance
2921-
exec_timeout_secs: 3600
2907+
exec_timeout_secs: 7200
29222908
commands:
29232909
- command: expansions.update
29242910
type: setup
@@ -2934,12 +2920,12 @@ tasks:
29342920
- func: run spec driver benchmarks
29352921
- command: perf.send
29362922
params:
2937-
file: src/results.json
2923+
file: src/test/benchmarks/driver_bench/results.json
29382924
- name: run-spec-benchmark-tests-node-server-timeoutMS-120000
29392925
tags:
29402926
- run-spec-benchmark-tests
29412927
- performance
2942-
exec_timeout_secs: 3600
2928+
exec_timeout_secs: 7200
29432929
commands:
29442930
- command: expansions.update
29452931
type: setup
@@ -2955,12 +2941,12 @@ tasks:
29552941
- func: run spec driver benchmarks
29562942
- command: perf.send
29572943
params:
2958-
file: src/results.json
2944+
file: src/test/benchmarks/driver_bench/results.json
29592945
- name: run-spec-benchmark-tests-node-server-timeoutMS-0
29602946
tags:
29612947
- run-spec-benchmark-tests
29622948
- performance
2963-
exec_timeout_secs: 3600
2949+
exec_timeout_secs: 7200
29642950
commands:
29652951
- command: expansions.update
29662952
type: setup
@@ -2976,12 +2962,12 @@ tasks:
29762962
- func: run spec driver benchmarks
29772963
- command: perf.send
29782964
params:
2979-
file: src/results.json
2965+
file: src/test/benchmarks/driver_bench/results.json
29802966
- name: run-spec-benchmark-tests-node-server-monitorCommands-true
29812967
tags:
29822968
- run-spec-benchmark-tests
29832969
- performance
2984-
exec_timeout_secs: 3600
2970+
exec_timeout_secs: 7200
29852971
commands:
29862972
- command: expansions.update
29872973
type: setup
@@ -2997,12 +2983,12 @@ tasks:
29972983
- func: run spec driver benchmarks
29982984
- command: perf.send
29992985
params:
3000-
file: src/results.json
2986+
file: src/test/benchmarks/driver_bench/results.json
30012987
- name: run-spec-benchmark-tests-node-server-logging
30022988
tags:
30032989
- run-spec-benchmark-tests
30042990
- performance
3005-
exec_timeout_secs: 3600
2991+
exec_timeout_secs: 7200
30062992
commands:
30072993
- command: expansions.update
30082994
type: setup
@@ -3018,25 +3004,7 @@ tasks:
30183004
- func: run spec driver benchmarks
30193005
- command: perf.send
30203006
params:
3021-
file: src/results.json
3022-
- name: run-spec-benchmark-tests-node-server-new
3023-
tags:
3024-
- run-spec-benchmark-tests
3025-
- performance
3026-
exec_timeout_secs: 18000
3027-
commands:
3028-
- command: expansions.update
3029-
type: setup
3030-
params:
3031-
updates:
3032-
- {key: NODE_LTS_VERSION, value: v22.11.0}
3033-
- {key: VERSION, value: v6.0-perf}
3034-
- {key: TOPOLOGY, value: server}
3035-
- {key: AUTH, value: noauth}
3036-
- {key: MONGODB_CLIENT_OPTIONS, value: '{}'}
3037-
- func: install dependencies
3038-
- func: bootstrap mongo-orchestration
3039-
- func: run new spec driver benchmarks
3007+
file: src/test/benchmarks/driver_bench/results.json
30403008
- name: run-unit-tests-node-16
30413009
tags:
30423010
- unit-tests
@@ -4856,7 +4824,6 @@ buildvariants:
48564824
- run-spec-benchmark-tests-node-server-timeoutMS-0
48574825
- run-spec-benchmark-tests-node-server-monitorCommands-true
48584826
- run-spec-benchmark-tests-node-server-logging
4859-
- run-spec-benchmark-tests-node-server-new
48604827
- name: rhel8-custom-dependency-tests
48614828
display_name: Custom Dependency Version Test
48624829
run_on: rhel80-large

.evergreen/generate_evergreen_tasks.js

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ function addPerformanceTasks() {
728728
const makePerfTask = (name, MONGODB_CLIENT_OPTIONS) => ({
729729
name,
730730
tags: ['run-spec-benchmark-tests', 'performance'],
731-
exec_timeout_secs: 3600,
731+
exec_timeout_secs: 7200,
732732
commands: [
733733
updateExpansions({
734734
NODE_LTS_VERSION: 'v22.11.0',
@@ -744,33 +744,11 @@ function addPerformanceTasks() {
744744
].map(func => ({ func })),
745745
{
746746
command: 'perf.send',
747-
params: { file: 'src/results.json' }
747+
params: { file: 'src/test/benchmarks/driver_bench/results.json' }
748748
}
749749
]
750750
});
751751

752-
// TODO(NODE-6729): Remove this task when the original tasks are using the new runner
753-
const makePerfTaskNEW = (name, MONGODB_CLIENT_OPTIONS) => ({
754-
name,
755-
tags: ['run-spec-benchmark-tests', 'performance'],
756-
exec_timeout_secs: 18000,
757-
commands: [
758-
updateExpansions({
759-
NODE_LTS_VERSION: 'v22.11.0',
760-
VERSION: 'v6.0-perf',
761-
TOPOLOGY: 'server',
762-
AUTH: 'noauth',
763-
MONGODB_CLIENT_OPTIONS: JSON.stringify(MONGODB_CLIENT_OPTIONS)
764-
}),
765-
...[
766-
'install dependencies',
767-
'bootstrap mongo-orchestration',
768-
'run new spec driver benchmarks'
769-
].map(func => ({ func }))
770-
// No perf send! just testing
771-
]
772-
});
773-
774752
const tasks = [
775753
makePerfTask('run-spec-benchmark-tests-node-server', {}),
776754
makePerfTask('run-spec-benchmark-tests-node-server-timeoutMS-120000', { timeoutMS: 120000 }),
@@ -781,8 +759,7 @@ function addPerformanceTasks() {
781759
makePerfTask('run-spec-benchmark-tests-node-server-logging', {
782760
mongodbLogPath: 'stderr',
783761
mongodbLogComponentSeverities: { default: 'trace' }
784-
}),
785-
makePerfTaskNEW('run-spec-benchmark-tests-node-server-new', {})
762+
})
786763
];
787764

788765
TASKS.push(...tasks);

.evergreen/run-benchmarks.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ 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
20-
2114
# If MONGODB_CLIENT_OPTIONS contains mongodbLogComponentSeverities redirect stderr to a file
2215
if [[ $MONGODB_CLIENT_OPTIONS == *"mongodbLogComponentSeverities"* ]]; then
2316
npm run check:bench 2> bench.log

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
"build:docs": "./etc/docs/build.ts",
129129
"build:typedoc": "typedoc",
130130
"build:nightly": "node ./.github/scripts/nightly.mjs",
131-
"check:bench": "node test/benchmarks/driverBench",
131+
"check:bench": "npm --prefix test/benchmarks/driver_bench start",
132132
"check:coverage": "nyc npm run test:all",
133133
"check:integration-coverage": "nyc npm run check:test",
134134
"check:lambda": "mocha --config test/mocha_lambda.json test/integration/node-specific/examples/handler.test.js",

0 commit comments

Comments
 (0)