Skip to content

Commit cad2914

Browse files
committed
Refactorized the rules targetting profiling-*
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
1 parent 4dba2f1 commit cad2914

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,20 @@ semgrep: ## Run semgrep to find bugs and enforce code standards
124124
profiling-gprof: ## Callgraph profiling (need "apt install graphviz")
125125
@echo "Start Glances for 30 iterations (more or less 1 mins, please do not exit !)"
126126
sleep 3
127-
./venv/bin/python -m cProfile -o ./glances.cprof ./run.py --stop-after 30
128-
./venv-dev/bin/gprof2dot -f pstats ./glances.cprof | dot -Tsvg -o ./docs/_static/glances-cgraph.svg
127+
$(PYTHON) -m cProfile -o ./glances.cprof ./run.py --stop-after 30
128+
$(VENV_DEV)/gprof2dot -f pstats ./glances.cprof | dot -Tsvg -o ./docs/_static/glances-cgraph.svg
129129
rm -f ./glances.cprof
130130

131131
profiling-pyinstrument: ## PyInstrument profiling
132132
@echo "Start Glances for 30 iterations (more or less 1 mins, please do not exit !)"
133133
sleep 3
134-
./venv/bin/pip install pyinstrument
135-
./venv/bin/python -m pyinstrument -r html -o ./docs/_static/glances-pyinstrument.html -m glances --stop-after 30
134+
$(PIP) install pyinstrument
135+
$(PYTHON) -m pyinstrument -r html -o ./docs/_static/glances-pyinstrument.html -m glances --stop-after 30
136136

137137
profiling-pyspy: ## Flame profiling (currently not compatible with Python 3.12)
138138
@echo "Start Glances for 30 iterations (more or less 1 mins, please do not exit !)"
139139
sleep 3
140-
./venv-dev/bin/py-spy record -o ./docs/_static/glances-flame.svg -d 60 -s -- ./venv/bin/python ./run.py --stop-after 30
140+
$(VENV_DEV)/py-spy record -o ./docs/_static/glances-flame.svg -d 60 -s -- $(PYTHON) ./run.py --stop-after 30
141141

142142
profiling: profiling-gprof profiling-pyinstrument profiling-pyspy ## Profiling of the Glances software
143143

0 commit comments

Comments
 (0)