Skip to content

Commit 1d6eba6

Browse files
committed
chore: test csot perf
1 parent e5582ed commit 1d6eba6

File tree

5 files changed

+118
-2
lines changed

5 files changed

+118
-2
lines changed

.evergreen/config.in.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,7 @@ functions:
11031103
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
11041104
MONGODB_URI: ${MONGODB_URI}
11051105
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1106+
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
11061107
binary: bash
11071108
args:
11081109
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
@@ -1168,6 +1169,53 @@ tasks:
11681169
params:
11691170
file: src/results.json
11701171

1172+
- name: run-spec-benchmark-tests-node-server-timeoutMS-120000
1173+
tags:
1174+
- run-spec-benchmark-tests
1175+
- performance
1176+
exec_timeout_secs: 3600
1177+
commands:
1178+
- command: expansions.update
1179+
type: setup
1180+
params:
1181+
updates:
1182+
- { key: NODE_LTS_VERSION, value: v18.16.0 }
1183+
- { key: NPM_VERSION, value: "9" }
1184+
- { key: VERSION, value: v6.0-perf }
1185+
- { key: TOPOLOGY, value: server }
1186+
- { key: AUTH, value: noauth }
1187+
- { key: MONGODB_CLIENT_OPTIONS, value: '{"timeoutMS": 120000}' }
1188+
- func: install dependencies
1189+
- func: bootstrap mongo-orchestration
1190+
- func: run spec driver benchmarks
1191+
- command: perf.send
1192+
params:
1193+
file: src/results.json
1194+
1195+
- name: run-spec-benchmark-tests-node-server-timeoutMS-0
1196+
tags:
1197+
- run-spec-benchmark-tests
1198+
- performance
1199+
exec_timeout_secs: 3600
1200+
commands:
1201+
- command: expansions.update
1202+
type: setup
1203+
params:
1204+
updates:
1205+
- { key: NODE_LTS_VERSION, value: v18.16.0 }
1206+
- { key: NPM_VERSION, value: "9" }
1207+
- { key: VERSION, value: v6.0-perf }
1208+
- { key: TOPOLOGY, value: server }
1209+
- { key: AUTH, value: noauth }
1210+
- { key: MONGODB_CLIENT_OPTIONS, value: '{"timeoutMS": 0}' }
1211+
- func: install dependencies
1212+
- func: bootstrap mongo-orchestration
1213+
- func: run spec driver benchmarks
1214+
- command: perf.send
1215+
params:
1216+
file: src/results.json
1217+
1218+
11711219
- name: "test-gcpkms-task"
11721220
commands:
11731221
- command: expansions.update
@@ -1616,3 +1664,5 @@ buildvariants:
16161664
run_on: rhel90-dbx-perf-large
16171665
tasks:
16181666
- run-spec-benchmark-tests-node-server
1667+
- run-spec-benchmark-tests-node-server-timeoutMS-120000
1668+
- run-spec-benchmark-tests-node-server-timeoutMS-0

.evergreen/config.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@ functions:
10651065
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
10661066
MONGODB_URI: ${MONGODB_URI}
10671067
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1068+
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
10681069
binary: bash
10691070
args:
10701071
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
@@ -1128,6 +1129,50 @@ tasks:
11281129
- command: perf.send
11291130
params:
11301131
file: src/results.json
1132+
- name: run-spec-benchmark-tests-node-server-timeoutMS-120000
1133+
tags:
1134+
- run-spec-benchmark-tests
1135+
- performance
1136+
exec_timeout_secs: 3600
1137+
commands:
1138+
- command: expansions.update
1139+
type: setup
1140+
params:
1141+
updates:
1142+
- {key: NODE_LTS_VERSION, value: v18.16.0}
1143+
- {key: NPM_VERSION, value: '9'}
1144+
- {key: VERSION, value: v6.0-perf}
1145+
- {key: TOPOLOGY, value: server}
1146+
- {key: AUTH, value: noauth}
1147+
- {key: MONGODB_CLIENT_OPTIONS, value: '{"timeoutMS": 120000}'}
1148+
- func: install dependencies
1149+
- func: bootstrap mongo-orchestration
1150+
- func: run spec driver benchmarks
1151+
- command: perf.send
1152+
params:
1153+
file: src/results.json
1154+
- name: run-spec-benchmark-tests-node-server-timeoutMS-0
1155+
tags:
1156+
- run-spec-benchmark-tests
1157+
- performance
1158+
exec_timeout_secs: 3600
1159+
commands:
1160+
- command: expansions.update
1161+
type: setup
1162+
params:
1163+
updates:
1164+
- {key: NODE_LTS_VERSION, value: v18.16.0}
1165+
- {key: NPM_VERSION, value: '9'}
1166+
- {key: VERSION, value: v6.0-perf}
1167+
- {key: TOPOLOGY, value: server}
1168+
- {key: AUTH, value: noauth}
1169+
- {key: MONGODB_CLIENT_OPTIONS, value: '{"timeoutMS": 0}'}
1170+
- func: install dependencies
1171+
- func: bootstrap mongo-orchestration
1172+
- func: run spec driver benchmarks
1173+
- command: perf.send
1174+
params:
1175+
file: src/results.json
11311176
- name: test-gcpkms-task
11321177
commands:
11331178
- command: expansions.update
@@ -4547,6 +4592,8 @@ buildvariants:
45474592
run_on: rhel90-dbx-perf-large
45484593
tasks:
45494594
- run-spec-benchmark-tests-node-server
4595+
- run-spec-benchmark-tests-node-server-timeoutMS-120000
4596+
- run-spec-benchmark-tests-node-server-timeoutMS-0
45504597
- name: rhel80-large-gallium
45514598
display_name: rhel8 Node16
45524599
run_on: rhel80-large

.evergreen/run-benchmarks.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set -o nounset
77
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh
88

99
export MONGODB_URI=$MONGODB_URI
10+
export MONGODB_CLIENT_OPTIONS=$MONGODB_CLIENT_OPTIONS
1011

1112
npm run build:ts
1213
npm run check:bench

test/benchmarks/driverBench/common.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,22 @@ function loadSpecString(filePath) {
2323
return loadSpecFile(filePath, 'utf8');
2424
}
2525

26+
const MONGODB_CLIENT_OPTIONS = (() => {
27+
const optionsString = process.env.MONGODB_CLIENT_OPTIONS;
28+
let options = undefined;
29+
if (optionsString?.length) {
30+
options = JSON.parse(optionsString);
31+
}
32+
return { ...options };
33+
})();
34+
35+
const MONGODB_URI = (() => {
36+
if (process.env.MONGODB_URI?.length) return process.env.MONGODB_URI;
37+
return 'mongodb://127.0.0.1:27017';
38+
})();
39+
2640
function makeClient() {
27-
this.client = new MongoClient(process.env.MONGODB_URI || 'mongodb://127.0.0.1:27017');
41+
this.client = new MongoClient(MONGODB_URI, MONGODB_CLIENT_OPTIONS);
2842
}
2943

3044
function connectClient() {
@@ -101,6 +115,8 @@ async function writeSingleByteFileToBucket() {
101115
}
102116

103117
module.exports = {
118+
MONGODB_URI,
119+
MONGODB_CLIENT_OPTIONS,
104120
makeClient,
105121
connectClient,
106122
disconnectClient,

test/benchmarks/driverBench/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ let bsonType = 'js-bson';
1111
const { inspect } = require('util');
1212
const { writeFile } = require('fs/promises');
1313
const { makeParallelBenchmarks, makeSingleBench, makeMultiBench } = require('../mongoBench/suites');
14+
const { MONGODB_URI, MONGODB_CLIENT_OPTIONS } = require('./common');
1415

1516
const hw = os.cpus();
1617
const ram = os.totalmem() / 1024 ** 3;
@@ -89,7 +90,8 @@ benchmarkRunner
8990
return {
9091
info: {
9192
test_name: benchmarkName,
92-
tags: [bsonType]
93+
tags: [bsonType],
94+
args: { MONGODB_URI, MONGODB_CLIENT_OPTIONS }
9395
},
9496
metrics: [{ name: 'megabytes_per_second', value: result }]
9597
};

0 commit comments

Comments
 (0)