You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will build the granular tests and run them with `test/bench/etc/run_granular_benchmarks.js`. The `WARMUP` and `ITERATIONS` environment variables can be optionally provided to configure how these granular benchmarks
84
84
are run. `WARMUP` changes the number of iterations run before results are collected to give v8's
85
85
optimizing compiler time to reach steady state. `ITERATIONS` changes the number of iterations that
86
-
are measured and used to calculate summary statistics. Note also that the test can be configured to
87
-
make use of the local copy of bson when testing performance changes locally by setting the `LIBRARY`
88
-
variable to the root directory of the bson library to be tested.
86
+
are measured and used to calculate summary statistics.
89
87
90
88
```bash
91
-
WARMUP=100 ITERATIONS=1000 LIBRARY=$(pwd)npm run check:granular-bench
89
+
WARMUP=100 ITERATIONS=1000 npm run check:granular-bench
92
90
```
93
-
When the `LIBRARY` environment variable is unset, the benchmark clones and runs against the main
94
-
branch of this repository.
91
+
92
+
When the `LIBRARY` environment variable is unset, the benchmark clones and runs against the current working directory.
93
+
94
+
> [!NOTE]
95
+
> The test can be configured to make use of a different copy of bson when testing performance changes locally by setting the `LIBRARY` variable to the root directory of a copy of the bson library.
95
96
96
97
When the script is complete, results will be output to `test/bench/etc/resultsCollectedMeans.json`. These results will
97
98
be in a format compatible with evergreen's perf.send command. To convert these results to CSV, run
@@ -109,14 +110,15 @@ npm run check:spec-bench
109
110
110
111
This will run the spec benchmarks in `test/bench/spec/bsonBench.ts` which also makes use of the
111
112
`bson-bench` library. Results will be written to `bsonBench`. The warmup and iterations are not
112
-
configurable as these are determined by the common driver benchmarking specification, but similar
113
-
to the granular benchmarks, the spec benchmarks can be run against the local copy of bson by setting
114
-
the `LIBRARY` environment variable appropriately.
113
+
configurable as these are determined by the common driver benchmarking specification.
115
114
116
115
```bash
117
-
LIBRARY=$(pwd)npm run check:spec-bench
116
+
npm run check:spec-bench
118
117
```
119
118
119
+
> [!NOTE]
120
+
> The test can be configured to make use of a different copy of bson when testing performance changes locally by setting the `LIBRARY` variable to the root directory of a copy of the bson library.
121
+
120
122
### Commit messages
121
123
122
124
Please follow the [Conventional Commits specification][conventional-commit-style].
0 commit comments