Files
mongo/buildscripts/cost_model
Asher Kornfeld 8dc33a4aa1 SERVER-107786 Create workload for calibration of COLLSCAN node (#38773)
Co-authored-by: Militsa Sotirova <militsa.sotirova@mongodb.com>
GitOrigin-RevId: 512ed28ad6119f652e433c4f5622e8c747cf4fd4
2025-07-23 19:31:00 +00:00
..

Cost Model Calibrator

Python virtual environment

The following assumes you are using python from the MongoDB toolchain.

/opt/mongodbtoolchain/v4/bin/python3

Getting started

Make sure before running start.py, you have a locally running mongod instance (this must be run using the mongo-python3 virtual environment, so do it before step 1 below).

(mongo-python3) deactivate  # only if you have another python env activated
sh> /opt/mongodbtoolchain/v4/bin/python3 -m venv cm  # create new env
sh> source cm/bin/activate  # activate new env
(cm) python -m pip install -r requirements.txt  # install required packages
(cm) python start.py  # run the calibrator
(cm) deactivate  # back to bash
sh>

Install new packages

(cm) python -m pip install <package_name>     # install <package_name>
(cm) python -m pip freeze > requirements.txt  # do not forget to update requirements.txt