- Clone repository
- Create a new project in PyCharm pointing to root direcory of cloned repository
- Open
run.pyfile - With
run.pyfile opened press CONTROL+SHIFT+F10 - this will automatically add a configuration so you can easily run the file - Place breakpoints
- Press debug button to run the file in the debug mode (button with a bug icon next to the play (run) button)
- Follow detailed instructions in the
run.pyfile
- Clone the repository
- Run
pip install -r requirements.txt(better do it in a new virtual environment) - Run
python performance_comparisons.py - After it completed, you will see two files created in the measurments directory, where .json file is a json representation of the performance measurments, and the .jpeg file is the actual chart you can open with an image viewer.
! This is temporary, not very convenient method, it will be changed in the future
- In the
performance_comparisons.pyfile there is a list containing functions (algorithms) to be measured:
if __name__ == "__main__":
algorithms: list[Callable] = [quick_sort, insertion_sort]- To add or remove algorithms you want to measure, simply delete/append a function from/to this list.
- If you are running the script within an IDE, you can uncomment
plot.show()in the main method so that the plotted chart will be shown automatically.