diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index e96b391325b..382fc175078 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -1158,93 +1158,6 @@ tasks: - func: bootstrap kms servers - func: "run serverless tests" - - name: run-spec-benchmark-tests-node-server - tags: - - run-spec-benchmark-tests - - performance - exec_timeout_secs: 3600 - 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 } - - func: install dependencies - - func: bootstrap mongo-orchestration - - func: run spec driver benchmarks - - command: perf.send - params: - file: src/results.json - - - name: run-spec-benchmark-tests-node-server-timeoutMS-120000 - tags: - - run-spec-benchmark-tests - - performance - exec_timeout_secs: 3600 - 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: '{"timeoutMS": 120000}' } - - func: install dependencies - - func: bootstrap mongo-orchestration - - func: run spec driver benchmarks - - command: perf.send - params: - file: src/results.json - - - name: run-spec-benchmark-tests-node-server-timeoutMS-0 - tags: - - run-spec-benchmark-tests - - performance - exec_timeout_secs: 3600 - 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: '{"timeoutMS": 0}' } - - func: install dependencies - - func: bootstrap mongo-orchestration - - func: run spec driver benchmarks - - command: perf.send - params: - file: src/results.json - - - name: run-spec-benchmark-tests-node-server-monitorCommands-true - tags: - - run-spec-benchmark-tests - - performance - exec_timeout_secs: 3600 - 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: '{"monitorCommands": true}' } - - func: install dependencies - - func: bootstrap mongo-orchestration - - func: run spec driver benchmarks - - command: perf.send - params: - file: src/results.json - - name: "test-gcpkms-task" commands: - command: expansions.update @@ -1808,12 +1721,3 @@ post: ignore: - "*.md" -buildvariants: - - name: performance-tests - display_name: Performance Test - run_on: rhel90-dbx-perf-large - tasks: - - run-spec-benchmark-tests-node-server - - run-spec-benchmark-tests-node-server-timeoutMS-120000 - - run-spec-benchmark-tests-node-server-timeoutMS-0 - - run-spec-benchmark-tests-node-server-monitorCommands-true diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 3c7a277cff1..74cbe30a270 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1118,89 +1118,6 @@ tasks: - func: install dependencies - func: bootstrap kms servers - func: run serverless tests - - name: run-spec-benchmark-tests-node-server - tags: - - run-spec-benchmark-tests - - performance - exec_timeout_secs: 3600 - 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} - - func: install dependencies - - func: bootstrap mongo-orchestration - - func: run spec driver benchmarks - - command: perf.send - params: - file: src/results.json - - name: run-spec-benchmark-tests-node-server-timeoutMS-120000 - tags: - - run-spec-benchmark-tests - - performance - exec_timeout_secs: 3600 - 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: '{"timeoutMS": 120000}'} - - func: install dependencies - - func: bootstrap mongo-orchestration - - func: run spec driver benchmarks - - command: perf.send - params: - file: src/results.json - - name: run-spec-benchmark-tests-node-server-timeoutMS-0 - tags: - - run-spec-benchmark-tests - - performance - exec_timeout_secs: 3600 - 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: '{"timeoutMS": 0}'} - - func: install dependencies - - func: bootstrap mongo-orchestration - - func: run spec driver benchmarks - - command: perf.send - params: - file: src/results.json - - name: run-spec-benchmark-tests-node-server-monitorCommands-true - tags: - - run-spec-benchmark-tests - - performance - exec_timeout_secs: 3600 - 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: '{"monitorCommands": true}'} - - func: install dependencies - - func: bootstrap mongo-orchestration - - func: run spec driver benchmarks - - command: perf.send - params: - file: src/results.json - name: test-gcpkms-task commands: - command: expansions.update @@ -3560,6 +3477,111 @@ tasks: - func: setup aws env - func: remove aws-credential-providers - func: run aws ECS auth test + - name: run-spec-benchmark-tests-node-server + tags: + - run-spec-benchmark-tests + - performance + exec_timeout_secs: 3600 + 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 spec driver benchmarks + - command: perf.send + params: + file: src/results.json + - name: run-spec-benchmark-tests-node-server-timeoutMS-120000 + tags: + - run-spec-benchmark-tests + - performance + exec_timeout_secs: 3600 + 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: '{"timeoutMS":120000}'} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: run spec driver benchmarks + - command: perf.send + params: + file: src/results.json + - name: run-spec-benchmark-tests-node-server-timeoutMS-0 + tags: + - run-spec-benchmark-tests + - performance + exec_timeout_secs: 3600 + 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: '{"timeoutMS":0}'} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: run spec driver benchmarks + - command: perf.send + params: + file: src/results.json + - name: run-spec-benchmark-tests-node-server-monitorCommands-true + tags: + - run-spec-benchmark-tests + - performance + exec_timeout_secs: 3600 + 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: '{"monitorCommands":true}'} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: run spec driver benchmarks + - command: perf.send + params: + file: src/results.json + - name: run-spec-benchmark-tests-node-server-logging + tags: + - run-spec-benchmark-tests + - performance + exec_timeout_secs: 3600 + 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: '{"__enableMongoLogger":true,"__internalLoggerConfig":{"MONGODB_LOG_ALL":"trace","MONGODB_LOG_PATH":"stderr"}}'} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: run spec driver benchmarks + - command: perf.send + params: + file: src/results.json - name: run-unit-tests-node-16 tags: - unit-tests @@ -4770,14 +4792,6 @@ post: ignore: - '*.md' buildvariants: - - name: performance-tests - display_name: Performance Test - run_on: rhel90-dbx-perf-large - tasks: - - run-spec-benchmark-tests-node-server - - run-spec-benchmark-tests-node-server-timeoutMS-120000 - - run-spec-benchmark-tests-node-server-timeoutMS-0 - - run-spec-benchmark-tests-node-server-monitorCommands-true - name: rhel80-large-gallium display_name: rhel8 Node16 run_on: rhel80-large @@ -5410,6 +5424,15 @@ buildvariants: NODE_LTS_VERSION: 22 tasks: - test-atlas-data-lake + - name: performance-tests + display_name: Performance Test + run_on: rhel90-dbx-perf-large + tasks: + - run-spec-benchmark-tests-node-server + - run-spec-benchmark-tests-node-server-timeoutMS-120000 + - run-spec-benchmark-tests-node-server-timeoutMS-0 + - run-spec-benchmark-tests-node-server-monitorCommands-true + - run-spec-benchmark-tests-node-server-logging - name: rhel8-custom-dependency-tests display_name: Custom Dependency Version Test run_on: rhel80-large diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index c398c039010..0a916b7580f 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -128,7 +128,7 @@ BASE_TASKS.push({ { func: 'bootstrap mongo-orchestration' }, { func: 'run x509 auth tests' } ] -}) +}); // manually added tasks TASKS.push( @@ -416,7 +416,9 @@ for (const { const nodeLtsDisplayName = `Node${NODE_LTS_VERSION}`; const name = `${osName}-${NODE_LTS_VERSION >= 20 ? nodeLtsDisplayName : nodeLTSCodeName}`; const display_name = `${osDisplayName} ${nodeLtsDisplayName}`; - const NPM_VERSION = versions.find(({versionNumber}) => versionNumber === NODE_LTS_VERSION).npmVersion; + const NPM_VERSION = versions.find( + ({ versionNumber }) => versionNumber === NODE_LTS_VERSION + ).npmVersion; const expansions = { NODE_LTS_VERSION, NPM_VERSION }; const taskNames = tasks.map(({ name }) => name); @@ -535,7 +537,7 @@ SINGLETON_TASKS.push( tags: ['resource-management'], commands: [ updateExpansions({ - NODE_LTS_VERSION: "v16.20.2", + NODE_LTS_VERSION: 'v16.20.2', NPM_VERSION: 9 }), { func: 'install dependencies' }, @@ -587,7 +589,7 @@ function* makeTypescriptTasks() { { func: 'install dependencies' }, { func: 'compile driver' } ] - } + }; } function makeCheckTypesTask(TS_VERSION, TYPES_VERSION) { return { @@ -603,10 +605,10 @@ function* makeTypescriptTasks() { { func: 'install dependencies' }, { func: 'check types' } ] - } + }; } - const typesVersion = require('../package.json').devDependencies['@types/node'].slice(1) + const typesVersion = require('../package.json').devDependencies['@types/node'].slice(1); yield makeCheckTypesTask('next', typesVersion); yield makeCheckTypesTask('current', typesVersion); @@ -665,7 +667,7 @@ for (const version of ['5.0', 'rapid', 'latest']) { NODE_LTS_VERSION: LOWEST_LTS, NPM_VERSION: 9, VERSION: version, - TOPOLOGY: 'replica_set', + TOPOLOGY: 'replica_set' }), { func: 'install dependencies' }, { func: 'bootstrap mongo-orchestration' }, @@ -714,6 +716,58 @@ const coverageTask = { SINGLETON_TASKS.push(coverageTask); SINGLETON_TASKS.push(...customDependencyTests); +function addPerformanceTasks() { + const makePerfTask = (name, MONGODB_CLIENT_OPTIONS) => ({ + name, + tags: ['run-spec-benchmark-tests', 'performance'], + exec_timeout_secs: 3600, + 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 spec driver benchmarks' + ].map(func => ({ func })), + { + command: 'perf.send', + params: { file: 'src/results.json' } + } + ] + }); + + const tasks = [ + makePerfTask('run-spec-benchmark-tests-node-server', {}), + makePerfTask('run-spec-benchmark-tests-node-server-timeoutMS-120000', { timeoutMS: 120000 }), + makePerfTask('run-spec-benchmark-tests-node-server-timeoutMS-0', { timeoutMS: 0 }), + makePerfTask('run-spec-benchmark-tests-node-server-monitorCommands-true', { + monitorCommands: true + }), + makePerfTask('run-spec-benchmark-tests-node-server-logging', { + __enableMongoLogger: true, + __internalLoggerConfig: { + MONGODB_LOG_ALL: 'trace', + MONGODB_LOG_PATH: 'stderr' + } + }) + ]; + + TASKS.push(...tasks); + + BUILD_VARIANTS.push({ + name: 'performance-tests', + display_name: 'Performance Test', + run_on: 'rhel90-dbx-perf-large', + tasks: tasks.map(({ name }) => name) + }); +} +addPerformanceTasks(); + BUILD_VARIANTS.push({ name: 'rhel8-custom-dependency-tests', display_name: 'Custom Dependency Version Test', diff --git a/.evergreen/run-benchmarks.sh b/.evergreen/run-benchmarks.sh index a9db937f4bb..74c56c5f3b1 100644 --- a/.evergreen/run-benchmarks.sh +++ b/.evergreen/run-benchmarks.sh @@ -10,4 +10,11 @@ export MONGODB_URI=$MONGODB_URI export MONGODB_CLIENT_OPTIONS=$MONGODB_CLIENT_OPTIONS npm run build:ts -npm run check:bench + + +# If MONGODB_CLIENT_OPTIONS contains __enableMongoLogger redirect stderr to a file +if [[ $MONGODB_CLIENT_OPTIONS == *"__enableMongoLogger"* ]]; then + npm run check:bench 2> bench.log +else + npm run check:bench +fi