From cad29145f15df1b07fbaf027c352b7577569576f Mon Sep 17 00:00:00 2001 From: Ariel Otilibili Date: Mon, 5 Aug 2024 23:37:14 +0200 Subject: [PATCH] Refactorized the rules targetting `profiling-*` Signed-off-by: Ariel Otilibili --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 260bc14b..fd954c22 100644 --- a/Makefile +++ b/Makefile @@ -124,20 +124,20 @@ semgrep: ## Run semgrep to find bugs and enforce code standards profiling-gprof: ## Callgraph profiling (need "apt install graphviz") @echo "Start Glances for 30 iterations (more or less 1 mins, please do not exit !)" sleep 3 - ./venv/bin/python -m cProfile -o ./glances.cprof ./run.py --stop-after 30 - ./venv-dev/bin/gprof2dot -f pstats ./glances.cprof | dot -Tsvg -o ./docs/_static/glances-cgraph.svg + $(PYTHON) -m cProfile -o ./glances.cprof ./run.py --stop-after 30 + $(VENV_DEV)/gprof2dot -f pstats ./glances.cprof | dot -Tsvg -o ./docs/_static/glances-cgraph.svg rm -f ./glances.cprof profiling-pyinstrument: ## PyInstrument profiling @echo "Start Glances for 30 iterations (more or less 1 mins, please do not exit !)" sleep 3 - ./venv/bin/pip install pyinstrument - ./venv/bin/python -m pyinstrument -r html -o ./docs/_static/glances-pyinstrument.html -m glances --stop-after 30 + $(PIP) install pyinstrument + $(PYTHON) -m pyinstrument -r html -o ./docs/_static/glances-pyinstrument.html -m glances --stop-after 30 profiling-pyspy: ## Flame profiling (currently not compatible with Python 3.12) @echo "Start Glances for 30 iterations (more or less 1 mins, please do not exit !)" sleep 3 - ./venv-dev/bin/py-spy record -o ./docs/_static/glances-flame.svg -d 60 -s -- ./venv/bin/python ./run.py --stop-after 30 + $(VENV_DEV)/py-spy record -o ./docs/_static/glances-flame.svg -d 60 -s -- $(PYTHON) ./run.py --stop-after 30 profiling: profiling-gprof profiling-pyinstrument profiling-pyspy ## Profiling of the Glances software