In this section, you will find some tips that can be useful for your development.
Docs
Backend
Frontend
Architecture
Backend
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/code
in your docker image. In my case, I created abackend/debugging/
directory and I write output files to/code/debugging/my_file.prof
while profiling the code.
It will output a profile file that can be visualized using snakeviz
:
snakeviz /my/file/path