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:

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:

snakeviz wrt_run.prof

Memory monitoring

TBD