In this section, you will find some tips that can be useful for your development.
Profiling code in backend
You can use the
@profile decorator that write profile to the chosen path:
from metagenedb.common.utils.profiling import profile @profile("/my/file/path") def my_function(a, b, c): ...
Note: If you are running the backend on a docker, the architecture is different from your local architecture. Keep in mind that the
backend/folder is mounted in docker and corresponds to the path
/codein your docker image. In my case, I created a
backend/debugging/directory and I write output files to
/code/debugging/my_file.profwhile profiling the code.
It will output a profile file that can be visualized using