From b2f4f373ce6ee8bf1c1af396ffa6a7392664abf6 Mon Sep 17 00:00:00 2001 From: Kenzo-Hugo Hillion <kenzo-hugo.hillion1@pasteur.fr> Date: Wed, 27 Nov 2019 15:48:30 +0100 Subject: [PATCH] Add documentation about profiling --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 0c0959a..4a39d53 100644 --- a/README.md +++ b/README.md @@ -127,3 +127,21 @@ For the moment you can: > **Note**: You can also execute the scripts locally from a `pipenv shell` for instance. You need to make sure that you change the way to log to postgres since the access is different from your machine compared to from a container. + +----- + +## Dev tips + +#### Profiling code + +```python +from metagenedb.common.utils.profiling import profile + +@profile("/my/file/path") +def my_function(a, b, c): + ... +``` + +```bash +snakeviz /my/file/path +``` \ No newline at end of file -- GitLab