Skip to content

Commit

Permalink
chore(NODE-6729): move to new benchmark runner
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Feb 7, 2025
1 parent 8936770 commit c809a5f
Show file tree
Hide file tree
Showing 173 changed files with 20 additions and 1,463 deletions.
16 changes: 0 additions & 16 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -707,22 +707,6 @@ functions:
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh

# TODO(NODE-6729): Remove this task when the original tasks are using the new runner
"run new spec driver benchmarks":
- command: subprocess.exec
type: test
params:
working_dir: "src"
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
MONGODB_URI: ${MONGODB_URI}
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
NEW_BENCH: "true"
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh

"run x509 auth tests":
- command: subprocess.exec
type: test
Expand Down
48 changes: 10 additions & 38 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -632,20 +632,6 @@ functions:
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
run new spec driver benchmarks:
- command: subprocess.exec
type: test
params:
working_dir: src
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
MONGODB_URI: ${MONGODB_URI}
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
NEW_BENCH: 'true'
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
run x509 auth tests:
- command: subprocess.exec
type: test
Expand Down Expand Up @@ -2933,7 +2919,8 @@ tasks:
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json
working_dir: src
file: test/benchmarks/driver_bench/results.json
- name: run-spec-benchmark-tests-node-server-timeoutMS-120000
tags:
- run-spec-benchmark-tests
Expand All @@ -2954,7 +2941,8 @@ tasks:
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json
working_dir: src
file: test/benchmarks/driver_bench/results.json
- name: run-spec-benchmark-tests-node-server-timeoutMS-0
tags:
- run-spec-benchmark-tests
Expand All @@ -2975,7 +2963,8 @@ tasks:
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json
working_dir: src
file: test/benchmarks/driver_bench/results.json
- name: run-spec-benchmark-tests-node-server-monitorCommands-true
tags:
- run-spec-benchmark-tests
Expand All @@ -2996,7 +2985,8 @@ tasks:
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json
working_dir: src
file: test/benchmarks/driver_bench/results.json
- name: run-spec-benchmark-tests-node-server-logging
tags:
- run-spec-benchmark-tests
Expand All @@ -3017,25 +3007,8 @@ tasks:
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json
- name: run-spec-benchmark-tests-node-server-new
tags:
- run-spec-benchmark-tests
- performance
exec_timeout_secs: 18000
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: NODE_LTS_VERSION, value: v22.11.0}
- {key: VERSION, value: v6.0-perf}
- {key: TOPOLOGY, value: server}
- {key: AUTH, value: noauth}
- {key: MONGODB_CLIENT_OPTIONS, value: '{}'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: run new spec driver benchmarks
working_dir: src
file: test/benchmarks/driver_bench/results.json
- name: run-unit-tests-node-16
tags:
- unit-tests
Expand Down Expand Up @@ -4855,7 +4828,6 @@ buildvariants:
- run-spec-benchmark-tests-node-server-timeoutMS-0
- run-spec-benchmark-tests-node-server-monitorCommands-true
- run-spec-benchmark-tests-node-server-logging
- run-spec-benchmark-tests-node-server-new
- name: rhel8-custom-dependency-tests
display_name: Custom Dependency Version Test
run_on: rhel80-large
Expand Down
30 changes: 5 additions & 25 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,33 +744,14 @@ function addPerformanceTasks() {
].map(func => ({ func })),
{
command: 'perf.send',
params: { file: 'src/results.json' }
params: {
working_dir: 'src',
file: 'test/benchmarks/driver_bench/results.json'
}
}
]
});

// TODO(NODE-6729): Remove this task when the original tasks are using the new runner
const makePerfTaskNEW = (name, MONGODB_CLIENT_OPTIONS) => ({
name,
tags: ['run-spec-benchmark-tests', 'performance'],
exec_timeout_secs: 18000,
commands: [
updateExpansions({
NODE_LTS_VERSION: 'v22.11.0',
VERSION: 'v6.0-perf',
TOPOLOGY: 'server',
AUTH: 'noauth',
MONGODB_CLIENT_OPTIONS: JSON.stringify(MONGODB_CLIENT_OPTIONS)
}),
...[
'install dependencies',
'bootstrap mongo-orchestration',
'run new spec driver benchmarks'
].map(func => ({ func }))
// No perf send! just testing
]
});

const tasks = [
makePerfTask('run-spec-benchmark-tests-node-server', {}),
makePerfTask('run-spec-benchmark-tests-node-server-timeoutMS-120000', { timeoutMS: 120000 }),
Expand All @@ -781,8 +762,7 @@ function addPerformanceTasks() {
makePerfTask('run-spec-benchmark-tests-node-server-logging', {
mongodbLogPath: 'stderr',
mongodbLogComponentSeverities: { default: 'trace' }
}),
makePerfTaskNEW('run-spec-benchmark-tests-node-server-new', {})
})
];

TASKS.push(...tasks);
Expand Down
7 changes: 0 additions & 7 deletions .evergreen/run-benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ export MONGODB_CLIENT_OPTIONS=$MONGODB_CLIENT_OPTIONS

npm run build:ts

if [[ "${NEW_BENCH:-}" == "true" ]]; then
pushd test/benchmarks/driver_bench
npm start
popd
exit 0
fi

# If MONGODB_CLIENT_OPTIONS contains mongodbLogComponentSeverities redirect stderr to a file
if [[ $MONGODB_CLIENT_OPTIONS == *"mongodbLogComponentSeverities"* ]]; then
npm run check:bench 2> bench.log
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"build:docs": "./etc/docs/build.ts",
"build:typedoc": "typedoc",
"build:nightly": "node ./.github/scripts/nightly.mjs",
"check:bench": "node test/benchmarks/driverBench",
"check:bench": "npm --prefix test/benchmarks/driver_bench start",
"check:coverage": "nyc npm run test:all",
"check:integration-coverage": "nyc npm run check:test",
"check:lambda": "mocha --config test/mocha_lambda.json test/integration/node-specific/examples/handler.test.js",
Expand Down
204 changes: 0 additions & 204 deletions test/benchmarks/driverBench/common.js

This file was deleted.

Loading

0 comments on commit c809a5f

Please sign in to comment.