tools: report cleanups, update coverage report with other code docs

This commit is contained in:
Simon Michael 2010-11-19 22:04:20 +00:00
parent 20fe14ebf4
commit 6bb8c8a114

View File

@ -338,13 +338,13 @@ fullcabaltest:
&& echo $@ PASSED \ && echo $@ PASSED \
) || echo $@ FAILED ) || echo $@ FAILED
# run performance benchmarks without saving results. # run simple performance benchmarks without saving results
# Requires some commands defined in bench.tests and some BENCHEXES defined above. # Requires some commands defined in bench.tests and some BENCHEXES defined above.
quickbench: samplejournals bench.tests tools/simplebench quickbench: samplejournals bench.tests tools/simplebench
tools/simplebench -fbench.tests $(BENCHEXES) tools/simplebench -fbench.tests $(BENCHEXES)
@rm -f benchresults.* @rm -f benchresults.*
# run performance benchmarks and save textual results in profs/. # run simple performance benchmarks and archive results
# Requires some commands defined in bench.tests and some BENCHEXES defined above. # Requires some commands defined in bench.tests and some BENCHEXES defined above.
simplebench: samplejournals bench.tests tools/simplebench simplebench: samplejournals bench.tests tools/simplebench
tools/simplebench -fbench.tests $(BENCHEXES) | tee profs/$(TIME).bench tools/simplebench -fbench.tests $(BENCHEXES) | tee profs/$(TIME).bench
@ -359,14 +359,16 @@ criterionbench: samplejournals tools/criterionbench
progressionbench: samplejournals tools/progressionbench progressionbench: samplejournals tools/progressionbench
tools/progressionbench -- -t png -k png tools/progressionbench -- -t png -k png
# generate, save, simplify and display an execution profile # generate and archive an execution profile
prof: samplejournals hledgerp prof: samplejournals hledgerp
@echo "Profiling: $(PROFCMD)" @echo "Profiling: $(PROFCMD)"
-$(PROFCMD) +RTS -p -RTS -$(PROFCMD) +RTS -p -RTS
mv hledgerp.prof profs/$(TIME)-orig.prof mv hledgerp.prof profs/$(TIME).prof
tools/simplifyprof.hs profs/$(TIME)-orig.prof >profs/$(TIME).prof (cd profs; rm -f latest*.prof; ln -s $(TIME).prof latest.prof)
(cd profs; rm -f latest*.prof; ln -s $(TIME)-orig.prof latest-orig.prof; ln -s $(TIME).prof latest.prof)
echo; cat profs/latest.prof # generate, archive, simplify and display an execution profile
viewprof: prof
tools/simplifyprof.hs profs/latest.prof
# generate and display an execution profile, don't save or simplify # generate and display an execution profile, don't save or simplify
quickprof: samplejournals hledgerp quickprof: samplejournals hledgerp
@ -374,13 +376,15 @@ quickprof: samplejournals hledgerp
-$(PROFCMD) +RTS -p -RTS -$(PROFCMD) +RTS -p -RTS
echo; cat hledgerp.prof echo; cat hledgerp.prof
# generate, save and display a graphical heap profile # generate and archive a graphical heap profile
heap: samplejournals hledgerp heap: samplejournals hledgerp
@echo "Profiling heap with: $(PROFCMD)" @echo "Profiling heap with: $(PROFCMD)"
$(PROFCMD) +RTS -hc -RTS $(PROFCMD) +RTS -hc -RTS
mv hledgerp.hp profs/$(TIME).hp mv hledgerp.hp profs/$(TIME).hp
(cd profs; rm -f latest.hp; ln -s $(TIME).hp latest.hp; \ (cd profs; rm -f latest.hp; ln -s $(TIME).hp latest.hp; \
hp2ps $(TIME).hp; rm -f latest.ps; ln -s $(TIME).ps latest.ps; rm -f *.aux) hp2ps $(TIME).hp; rm -f latest.ps; ln -s $(TIME).ps latest.ps; rm -f *.aux)
viewheap: heap
$(VIEWPS) profs/latest.ps $(VIEWPS) profs/latest.ps
# generate and display a graphical heap profile, don't save # generate and display a graphical heap profile, don't save
@ -390,11 +394,13 @@ quickheap: samplejournals hledgerp
hp2ps hledgerp.hp hp2ps hledgerp.hp
$(VIEWPS) hledger.ps $(VIEWPS) hledger.ps
# generate and display a code coverage report # generate a code coverage report
coverage: samplejournals hledgercov coverage: samplejournals hledgercov
@echo "Generating coverage report with $(COVCMD)" @echo "Generating coverage report with $(COVCMD)"
tools/coverage "markup --destdir=profs/coverage" test tools/coverage "markup --destdir=profs/coverage" test
cd profs/coverage; rm -f index.html; ln -s hpc_index.html index.html cd profs/coverage; rm -f index.html; ln -s hpc_index.html index.html
viewcoverage: coverage
$(VIEWHTML) profs/coverage/index.html $(VIEWHTML) profs/coverage/index.html
# get a debug prompt # get a debug prompt
@ -501,7 +507,7 @@ pushdocs: push
ssh simon@joyful.com 'make -C/repos/hledger docs' ssh simon@joyful.com 'make -C/repos/hledger docs'
# generate api & other code docs # generate api & other code docs
codedocs: hscolour apihaddock codehaddock #sourcegraph #hoogle codedocs: hscolour apihaddock codehaddock coverage #sourcegraph #hoogle
# browse the code docs # browse the code docs
viewcodedocs: viewcodedocs: