.. _software_profiling: Software profiling ================== Runtime monitoring ------------------ The runtime can be analyzed using `cProfile `_ from Python's standard library. To do this add the following code lines in `execute_routing.py `_: .. code-block:: python import cProfile def execute_routing(config, ship_config): prof = cProfile.Profile() prof.enable() ... prof.disable() prof.dump_stats('wrt_run.prof') The result can be visualized using `snakeviz `_: .. code-block:: shell snakeviz wrt_run.prof Memory monitoring ----------------- TBD