|
@@ -16,6 +16,7 @@ MDB_DIR = ext/openldap/libraries/liblmdb
|
|
|
XXHASH_DIR = ext/xxHash
|
|
|
VALGRIND_DUMP = /tmp/lsup_valgrind.log
|
|
|
CALLGRIND_DUMP = /tmp/lsup_callgrind.out
|
|
|
+MASSIF_DUMP = /tmp/lsup_massif.out
|
|
|
|
|
|
INCLUDE_BASE ::= . -Iinclude -I$(MDB_DIR) -I$(XXHASH_DIR) \
|
|
|
-Iext/tpl/src -Iext/hashmap -Iext/log/src
|
|
@@ -235,10 +236,19 @@ perftest: bin/perftest
|
|
|
|
|
|
|
|
|
.PHONY: profile
|
|
|
-profile: bin/perftest ## Run a profiling session. Output can be inspected with KCachegrind.
|
|
|
+profile: bin/profile ## Run a profiling session. Output can be inspected with KCachegrind.
|
|
|
LSUP_MDB_MAPSIZE=800000 valgrind --tool=callgrind \
|
|
|
--callgrind-out-file="$(CALLGRIND_DUMP)" bin/perftest 1000
|
|
|
- @echo "Profile dump written at $(CALLGRIND_DUMP)"
|
|
|
+ @echo "Profile dump written at $(CALLGRIND_DUMP). Open it with "\
|
|
|
+ "qcachegrind, kcachegrind, etc."
|
|
|
+
|
|
|
+
|
|
|
+.PHONY: footprint
|
|
|
+footprint: bin/perftest ## Measure memory footprint of storing 100K triples.
|
|
|
+ LSUP_MDB_MAPSIZE=80000000 valgrind --tool=massif \
|
|
|
+ --massif-out-file=$(MASSIF_DUMP) bin/perftest 100000
|
|
|
+ @echo "Memory stats file written at $(MASSIF_DUMP). Open it with "\
|
|
|
+ "massiftool or similar."
|
|
|
|
|
|
|
|
|
.PHONY: pytest
|