update, document "make profile"
This commit is contained in:
parent
bed6f0ce01
commit
a8ce8a55ce
10
Makefile
10
Makefile
@ -33,18 +33,20 @@ rebuild: clean build
|
|||||||
test:
|
test:
|
||||||
./hledger.hs 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
|
PROFBIN=hledgerp
|
||||||
BUILDPROF=ghc $(BUILDFLAGS) --make hledger.hs -prof -auto-all -o $(PROFBIN)
|
BUILDPROF=ghc $(BUILDFLAGS) --make hledger.hs -prof -auto-all -o $(PROFBIN)
|
||||||
RUNPROF=./$(PROFBIN) +RTS -p -RTS
|
RUNPROF=./$(PROFBIN) +RTS -p -RTS
|
||||||
PROFCMD=-s balance
|
PROFCMD=-f sample1000.ledger -s balance
|
||||||
TIME=`date +"%Y%m%d%H%M"`
|
TIME=`date +"%Y%m%d%H%M"`
|
||||||
profile:
|
profile: sampleledgers
|
||||||
@echo "Profiling $(PROFCMD)"
|
@echo "Profiling $(PROFCMD)"
|
||||||
$(BUILDPROF)
|
$(BUILDPROF)
|
||||||
$(RUNPROF) $(PROFCMD) >/dev/null
|
$(RUNPROF) $(PROFCMD) #>/dev/null
|
||||||
tools/simplifyprof.hs $(PROFBIN).prof >simple.prof
|
tools/simplifyprof.hs $(PROFBIN).prof >simple.prof
|
||||||
cp simple.prof profs/$(TIME).prof
|
cp simple.prof profs/$(TIME).prof
|
||||||
cat simple.prof
|
echo; cat simple.prof
|
||||||
|
|
||||||
# run performance benchmarks and save results in profs
|
# run performance benchmarks and save results in profs
|
||||||
# executables to test, prepend ./ to these if not in $PATH
|
# executables to test, prepend ./ to these if not in $PATH
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user