Skip to content

Commit c7cb12f

Browse files
committed
chore: test csot perf
1 parent 88c5368 commit c7cb12f

File tree

5 files changed

+118
-4
lines changed

5 files changed

+118
-4
lines changed

.evergreen/config.in.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,7 @@ functions:
11021102
env:
11031103
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
11041104
MONGODB_URI: ${MONGODB_URI}
1105+
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
11051106
binary: bash
11061107
args:
11071108
- ${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-18-server-6.0-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-18-server-6.0-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
@@ -1628,3 +1676,5 @@ buildvariants:
16281676
run_on: rhel90-dbx-perf-large
16291677
tasks:
16301678
- run-spec-benchmark-tests-node-18-server-6.0
1679+
- run-spec-benchmark-tests-node-18-server-6.0-timeoutMS-120000
1680+
- run-spec-benchmark-tests-node-18-server-6.0-timeoutMS-0

.evergreen/config.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ functions:
10641064
env:
10651065
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
10661066
MONGODB_URI: ${MONGODB_URI}
1067+
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
10671068
binary: bash
10681069
args:
10691070
- ${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-18-server-6.0-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-18-server-6.0-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
@@ -4559,6 +4604,8 @@ buildvariants:
45594604
run_on: rhel90-dbx-perf-large
45604605
tasks:
45614606
- run-spec-benchmark-tests-node-18-server-6.0
4607+
- run-spec-benchmark-tests-node-18-server-6.0-timeoutMS-120000
4608+
- run-spec-benchmark-tests-node-18-server-6.0-timeoutMS-0
45624609
- name: rhel80-large-gallium
45634610
display_name: rhel8 Node16
45644611
run_on: rhel80-large

.evergreen/run-benchmarks.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh
44

55
export MONGODB_URI=$MONGODB_URI
6+
export MONGODB_CLIENT_OPTIONS=$MONGODB_CLIENT_OPTIONS
67

78
npm run build:ts
89
npm run check:bench

test/benchmarks/driverBench/common.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +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', {
28-
timeoutMS: 0
29-
});
41+
this.client = new MongoClient(MONGODB_URI, MONGODB_CLIENT_OPTIONS);
3042
}
3143

3244
function connectClient() {
@@ -103,6 +115,8 @@ async function writeSingleByteFileToBucket() {
103115
}
104116

105117
module.exports = {
118+
MONGODB_URI,
119+
MONGODB_CLIENT_OPTIONS,
106120
makeClient,
107121
connectClient,
108122
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;
@@ -88,7 +89,8 @@ benchmarkRunner
8889
return {
8990
info: {
9091
test_name: benchmarkName,
91-
tags: [bsonType]
92+
tags: [bsonType],
93+
args: { MONGODB_URI, MONGODB_CLIENT_OPTIONS }
9294
},
9395
metrics: [{ name: 'megabytes_per_second', value: result }]
9496
};

0 commit comments

Comments
 (0)