mongo/buildscripts/cost_model
Matt Olma f360d12c33 SERVER-96080: Remove references to bonsai in buildscripts/cost_model (#32641)
GitOrigin-RevId: 6ed0765190afb716e06a50666e8ba610437414cd
2025-04-09 22:23:09 +00:00
..
.gitignore SERVER-69030 Add python requirements.txt for Cost Model 2022-11-10 11:18:11 +00:00
OWNERS.yml SERVER-93650 Add people as owners for Query Optimization owned files (#29093) 2024-11-20 14:45:04 +00:00
README.md SERVER-87034 Initial markdown format (#19276) 2024-02-27 19:58:04 +00:00
abt_calibrator.py SERVER-99522 Delete dead py linters (#31760) 2025-04-09 19:33:45 +00:00
benchmark.py SERVER-96080: Remove references to bonsai in buildscripts/cost_model (#32641) 2025-04-09 22:23:09 +00:00
calibration_settings.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
ce_data_settings.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
ce_generate_data.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
common.py SERVER-90570: Enable formatting checks for buildscripts directory, excluding idl (#22254) 2024-05-16 22:07:36 +00:00
config.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
cost_estimator.py SERVER-99522 Delete dead py linters (#31760) 2025-04-09 19:33:45 +00:00
data_generator.py SERVER-96080: Remove references to bonsai in buildscripts/cost_model (#32641) 2025-04-09 22:23:09 +00:00
database_instance.py SERVER-96080: Remove references to bonsai in buildscripts/cost_model (#32641) 2025-04-09 22:23:09 +00:00
end_to_end.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
execution_tree.py SERVER-96080: Remove references to bonsai in buildscripts/cost_model (#32641) 2025-04-09 22:23:09 +00:00
experiment.py SERVER-99522 Delete dead py linters (#31760) 2025-04-09 19:33:45 +00:00
mongod-inmemory.yaml SERVER-96080: Remove references to bonsai in buildscripts/cost_model (#32641) 2025-04-09 22:23:09 +00:00
mongod.yaml SERVER-96080: Remove references to bonsai in buildscripts/cost_model (#32641) 2025-04-09 22:23:09 +00:00
parameters_extractor.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
physical_tree.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
qsn_costing_parameters.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
query_solution_tree.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
random_generator.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
requirements.txt SERVER-81794 Upgrade cost_model python packages 2023-10-03 20:45:06 +00:00
start.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
workload_execution.py SERVER-96080: Remove references to bonsai in buildscripts/cost_model (#32641) 2025-04-09 22:23:09 +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