mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 10:17:35 +03:00
;make: clean up/fix hledgerprof/quickprof-CMD
[ci skip]
This commit is contained in:
parent
25fa835d9a
commit
bf6bd4003c
24
Makefile
24
Makefile
@ -59,7 +59,7 @@ dummy2: $(call def-help,RULE -n, show what RULE would do )
|
|||||||
export LANG?=en_US.UTF-8
|
export LANG?=en_US.UTF-8
|
||||||
|
|
||||||
# command to run during profiling (time and heap)
|
# command to run during profiling (time and heap)
|
||||||
PROFCMD=stack exec -- hledgerprof balance -f examples/10000x1000x10.journal >/dev/null
|
PROFCMD=stack exec --profile -- hledger balance -f examples/10000x1000x10.journal >/dev/null
|
||||||
|
|
||||||
#PROFRTSFLAGS=-p
|
#PROFRTSFLAGS=-p
|
||||||
PROFRTSFLAGS=-P
|
PROFRTSFLAGS=-P
|
||||||
@ -281,14 +281,11 @@ templates: \
|
|||||||
)
|
)
|
||||||
ln -sf hledger-web/$@
|
ln -sf hledger-web/$@
|
||||||
|
|
||||||
# force a compile even if binary exists, since we don't specify dependencies for these
|
|
||||||
.PHONY: bin/hledgerprof bin/hledgercov
|
|
||||||
|
|
||||||
hledgerprof: \
|
hledgerprof: \
|
||||||
$(call def-help,hledgerprof, build "hledgerprof" for profiling (with stack) )
|
$(call def-help,hledgerprof, build a hledger executable with profiling enabled (with stack) )
|
||||||
$(STACK) build hledger-lib hledger --library-profiling --executable-profiling --ghc-options=-fprof-auto
|
$(STACK) build --profile hledger
|
||||||
cp `$(STACK) exec which hledger`{,prof}
|
# hledger-lib --ghc-options=-fprof-auto
|
||||||
@echo to profile, use $(STACK) exec -- hledgerprof ...
|
# @echo "to profile, use $(STACK) exec --profile -- hledger ..."
|
||||||
|
|
||||||
hledgercov: \
|
hledgercov: \
|
||||||
$(call def-help,hledgercov, build "bin/hledgercov" for coverage reports (with ghc) )
|
$(call def-help,hledgercov, build "bin/hledgercov" for coverage reports (with ghc) )
|
||||||
@ -636,13 +633,16 @@ bench: samplejournals bench.sh $(call def-help,bench, benchmark commands in benc
|
|||||||
|
|
||||||
quickprof-%: hledgerprof samplejournals \
|
quickprof-%: hledgerprof samplejournals \
|
||||||
$(call def-help,quickprof-"CMD", run some command against a sample journal and display the execution profile )
|
$(call def-help,quickprof-"CMD", run some command against a sample journal and display the execution profile )
|
||||||
$(STACK) exec -- hledgerprof +RTS $(PROFRTSFLAGS) -RTS $* -f examples/10000x1000x10.journal >/dev/null
|
$(STACK) exec --profile -- hledger +RTS $(PROFRTSFLAGS) -RTS $* -f examples/1000x1000x10.journal >/dev/null
|
||||||
profiterole hledgerprof.prof
|
profiterole hledger.prof
|
||||||
@echo
|
@echo
|
||||||
@head -20 hledgerprof.prof
|
@head -20 hledger.prof
|
||||||
@echo ...
|
@echo ...
|
||||||
@echo
|
@echo
|
||||||
@echo see hledgerprof.prof or hledgerprof.prof.html for the full report
|
@head -20 hledger.profiterole.txt
|
||||||
|
@echo ...
|
||||||
|
@echo
|
||||||
|
@echo "See hledger.prof, hledger.profiterole.txt, hledger.profiterole.html for more."
|
||||||
|
|
||||||
# heap: samplejournals \
|
# heap: samplejournals \
|
||||||
# $(call def-help,heap,\
|
# $(call def-help,heap,\
|
||||||
|
Loading…
Reference in New Issue
Block a user