From a8ce8a55ce7197518a4a4581dfe460af7f6fd2ec Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 25 Jan 2009 08:43:50 +0000 Subject: [PATCH] update, document "make profile" --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 21d736772..d1d679ef4 100644 --- a/Makefile +++ b/Makefile @@ -33,18 +33,20 @@ rebuild: clean build test: ./hledger.hs test +# build profiling-enabled hledgerp and archive and show a cleaned-up profile +# you may need to rebuild some libs: sudo cabal install --reinstall -p ... PROFBIN=hledgerp BUILDPROF=ghc $(BUILDFLAGS) --make hledger.hs -prof -auto-all -o $(PROFBIN) RUNPROF=./$(PROFBIN) +RTS -p -RTS -PROFCMD=-s balance +PROFCMD=-f sample1000.ledger -s balance TIME=`date +"%Y%m%d%H%M"` -profile: +profile: sampleledgers @echo "Profiling $(PROFCMD)" $(BUILDPROF) - $(RUNPROF) $(PROFCMD) >/dev/null + $(RUNPROF) $(PROFCMD) #>/dev/null tools/simplifyprof.hs $(PROFBIN).prof >simple.prof cp simple.prof profs/$(TIME).prof - cat simple.prof + echo; cat simple.prof # run performance benchmarks and save results in profs # executables to test, prepend ./ to these if not in $PATH