mongo/buildscripts/cost_model
Daniel Moody e54f728ad4 SERVER-103927 switch from scons to bazel (#39284)
GitOrigin-RevId: 698b83c9b64adf5dfe2b670d16052f24342c04e3
2025-07-29 17:50:19 +00:00
..
.gitignore SERVER-69030 Add python requirements.txt for Cost Model 2022-11-10 11:18:11 +00:00
BUILD.bazel SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
README.md SERVER-87034 Initial markdown format (#19276) 2024-02-27 19:58:04 +00:00
abt_calibrator.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
benchmark.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
calibration_settings.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
ce_data_settings.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
ce_generate_data.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
common.py SERVER-67121 Cost Model and Calibration farmework 2022-07-05 09:31:30 +00:00
config.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
cost_estimator.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
data_generator.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
database_instance.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
end_to_end.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
execution_tree.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
experiment.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
mongod-inmemory.yaml SERVER-77174: Set CQF query knob values to the production defaults and update fallback mechanism for M2 2023-06-20 13:09:04 +00:00
mongod.yaml SERVER-77174: Set CQF query knob values to the production defaults and update fallback mechanism for M2 2023-06-20 13:09:04 +00:00
parameters_extractor.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
physical_tree.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
qsn_costing_parameters.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
query_solution_tree.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
random_generator.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
requirements.txt SERVER-81794 Upgrade cost_model python packages 2023-10-03 20:45:06 +00:00
start.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00
workload_execution.py SERVER-103927 switch from scons to bazel (#39284) 2025-07-29 17:50:19 +00:00

README.md

Cost Model Calibrator

Python virtual environment

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

/opt/mongodbtoolchain/v4/bin/python3

Getting started

(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