Skip to content

Commit a382485

Browse files
authored
test(NODE-5692): new benchmarks using bson-bench (#636)
1 parent 77fac2a commit a382485

File tree

134 files changed

+198913
-652
lines changed

Some content is hidden

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

134 files changed

+198913
-652
lines changed

.evergreen/config.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,24 @@ functions:
9494
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
9595
args:
9696
- .evergreen/run-bundling-test.sh
97-
run benchmarks:
97+
run granular benchmarks:
9898
- command: subprocess.exec
9999
type: test
100100
params:
101101
working_dir: src
102102
binary: bash
103103
add_expansions_to_env: true
104104
args:
105-
- .evergreen/run-benchmarks.sh
105+
- .evergreen/run-granular-benchmarks.sh
106+
run spec benchmarks:
107+
- command: subprocess.exec
108+
type: test
109+
params:
110+
working_dir: src
111+
binary: bash
112+
add_expansions_to_env: true
113+
args:
114+
- .evergreen/run-spec-benchmarks.sh
106115
tasks:
107116
- name: node-tests-v16
108117
tags: ["node"]
@@ -211,7 +220,7 @@ tasks:
211220
vars:
212221
TS_VERSION: "next"
213222
TRY_COMPILING_LIBRARY: "false"
214-
- name: run-benchmarks-node-18
223+
- name: run-granular-benchmarks-node-18
215224
commands:
216225
- func: fetch source
217226
vars:
@@ -220,12 +229,26 @@ tasks:
220229
- func: install dependencies
221230
vars:
222231
NPM_VERSION: 9
223-
- func: run benchmarks
232+
- func: run granular benchmarks
224233
vars:
225-
WEB: false
234+
WARMUP: 1000
235+
ITERATIONS: 1000
236+
- command: perf.send
237+
params:
238+
file: src/test/bench/etc/resultsCollected.json
239+
- name: run-spec-benchmarks-node-18
240+
commands:
241+
- func: fetch source
242+
vars:
243+
# This needs to stay pinned at Node v18.16.0 for consistency across perf runs.
244+
NODE_LTS_VERSION: v18.16.0
245+
- func: install dependencies
246+
vars:
247+
NPM_VERSION: 9
248+
- func: run spec benchmarks
226249
- command: perf.send
227250
params:
228-
file: src/benchmarks.json
251+
file: src/bsonBench.json
229252
- name: check-eslint-plugin
230253
commands:
231254
- func: fetch source
@@ -252,4 +275,5 @@ buildvariants:
252275
display_name: RHEL 9.0 perf
253276
run_on: rhel90-dbx-perf-large
254277
tasks:
255-
- run-benchmarks-node-18
278+
- run-granular-benchmarks-node-18
279+
- run-spec-benchmarks-node-18

.evergreen/run-granular-benchmarks.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh"
4+
set -o xtrace
5+
WARMUP=$WARMUP
6+
ITERATIONS=$ITERATIONS
7+
8+
WARMUP=$WARMUP ITERATIONS=$ITERATIONS npm run check:granular-bench

.evergreen/run-benchmarks.sh renamed to .evergreen/run-spec-benchmarks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh"
44

5-
npm run check:bench
5+
npm run check:spec-bench

etc/benchmarks/bson_versions.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

etc/benchmarks/convert_to_csv.sh

Lines changed: 0 additions & 52 deletions
This file was deleted.

etc/benchmarks/install_bson_versions.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

etc/benchmarks/lib_runner.mjs

Lines changed: 0 additions & 152 deletions
This file was deleted.

0 commit comments

Comments
 (0)