This feature is currently in beta and is subject to change. If you are
interested in testing it out, please reach out to us via
Discord or
email out support.
Getting Started
Prerequisites
- MongoDB instrument enabled in your CodSpeed account (reach out to us to enable)
- MongoDB instance running in your CI environment or the cloud
How to set up a MongoDB instance in your CI environment?
How to set up a MongoDB instance in your CI environment?
We recommend: - using the
art049/mongodb-cluster-action
to run MongoDB in your CI environment - dynamic setup of a MongoDB instance
during the setup phase of the benchmarks is supported, using tools such as
testcontainers
or
vitest-mongodb
Activate the mongodb
instrument in the CodSpeed Action
To activate the MongoDB instrument during the run of your benchmarks in the
CodSpeed Action, make the following changes to your workflow file:
Using
mongo-uri-env-name
If using the mongo-uri-env-name
option, make sure to set the actual value of
the environment variable in the env
section of your workflow file. Otherwise,
the MongoDB instrument will not be able to connect to your MongoDB instance.Dynamic connection stringIf the value of connection string cannot be set in the workflow file, you can
omit the
mongo-uri-env-name
option and provide the connection string
dynamically during the setup phase of your benchmarks.Language specific examples
If you are using the
mongo-uri-env-name
option, the integration should work
out of the box at this stage 🎉However, if you are not using the mongo-uri-env-name
option, you will have to
provide the connection string dynamically during the setup phase of your
benchmarks. Select your language below to see how to do that.- Python: Not supported yet (coming soon)
- Rust: Not supported yet (coming soon)