summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2022-11-12 17:15:44 +0100
committernicolargo <nicolas@nicolargo.com>2022-11-12 17:15:44 +0100
commit056e9d2940562e8107bc82dc62f36e9d2e7cc455 (patch)
treea514852314411758cffa0e5e3487ca61bf2c3d5f /Makefile
parent91b6b4aff758d50bc100df823f9422596c2feb51 (diff)
Add unitary test for memory profiling
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 993bda07..3064a1f1 100644
--- a/Makefile
+++ b/Makefile
@@ -74,6 +74,18 @@ trace-malloc: ## Trace the malloc() calls
memory-leak: ## Profile memory leaks
./venv/bin/python -m glances -C ./conf/glances.conf --memory-leak
+memory-profiling: ## Profile memory usage
+ @echo "It's a very long test (~4 hours)..."
+ rm -f mprofile_*.dat
+ @echo "1/2 - Start memory profiling with the history option enable"
+ ./venv/bin/mprof run -T 1 -C run.py -C ./conf/glances.conf --stop-after 2400 --quiet
+ ./venv/bin/mprof plot --output ./docs/_static/glances-memory-profiling-with-history.png
+ rm -f mprofile_*.dat
+ @echo "2/2 - Start memory profiling with the history option disable"
+ ./venv/bin/mprof run -T 1 -C run.py -C ./conf/glances.conf --disable-history --stop-after 2400 --quiet
+ ./venv/bin/mprof plot --output ./docs/_static/glances-memory-profiling-without-history.png
+ rm -f mprofile_*.dat
+
# ===================================================================
# Docs
# ===================================================================