buildscripts/cost_model/README.md
First, prepare the MongoDB server:
source python3-venv/bin/activate
(python3-venv) bazel build --config=opt install-devcore
(python3-venv) bazel-bin/install-mongod/bin/mongod --setParameter internalMeasureQueryExecutionTimeInNanoseconds=true
In another terminal:
cd buildscripts/cost_model
alias python=/opt/mongodbtoolchain/v4/bin/python3
deactivate
/opt/mongodbtoolchain/v4/bin/python3 -m venv cm
source cm/bin/activate
(cm) python -m pip install -r requirements.txt
(cm) python start.py
(cm) python join_start.py
Note: For CBR calibration, the first time it will take a while since it has to generate the data. Afterwards, as long as you aren't modifying the collections, you can comment out await generator.populate_collections() in start.py - this will make it a lot faster.
(cm) deactivate
(cm) python -m pip install <package_name>
(cm) python -m pip freeze > requirements.txt