tools: add bench.hs with notes; make quickbench -> make bench
This commit is contained in:
		
							parent
							
								
									6f92e70575
								
							
						
					
					
						commit
						30e4d26534
					
				
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							| @ -731,13 +731,9 @@ test-stack%yaml: | |||||||
| 	stack --stack-yaml stack$*yaml clean | 	stack --stack-yaml stack$*yaml clean | ||||||
| 	stack --stack-yaml stack$*yaml --install-ghc build --test --bench --haddock --no-haddock-deps | 	stack --stack-yaml stack$*yaml --install-ghc build --test --bench --haddock --no-haddock-deps | ||||||
| 
 | 
 | ||||||
| BENCHEXES=hledger-0.27,hledger | BENCHEXES=hledger-1.4,hledger | ||||||
| 
 | 
 | ||||||
| quickbench: samplejournals bench.sh \ | bench: samplejournals bench.sh $(call def-help,bench, benchmark commands in bench.sh with quickbench and $(BENCHEXES)) | ||||||
| 	$(call def-help,quickbench,\
 |  | ||||||
| 	run simple performance benchmarks without saving results\
 |  | ||||||
| 	Requires some commands defined in bench.sh\
 |  | ||||||
| 	) |  | ||||||
| 	quickbench -v -w $(BENCHEXES) | 	quickbench -v -w $(BENCHEXES) | ||||||
| 
 | 
 | ||||||
| # bench: samplejournals tests/bench.tests tools/simplebench \
 | # bench: samplejournals tests/bench.tests tools/simplebench \
 | ||||||
|  | |||||||
							
								
								
									
										36
									
								
								bench.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										36
									
								
								bench.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,36 @@ | |||||||
|  | # Some standard commands to benchmark. "quickbench" runs these by default. | ||||||
|  | # There is another set of benchmarks in the hledger package: hledger/bench/bench.hs | ||||||
|  | # Here is a quick benchmarking guide. Note these are quick measurements which | ||||||
|  | # can be affected by system activity. Usually this isn't a problem. The last | ||||||
|  | # (criterion) is more robust. | ||||||
|  | #  | ||||||
|  | # Generate the test journals: make samplejournals  | ||||||
|  | # Get quickbench: stack install quickbench | ||||||
|  | # Measure performance: | ||||||
|  | # time ./bench.sh      # show if these work, what they do, total time | ||||||
|  | # quickbench [OPTS]    # time each command, one or more times | ||||||
|  | # make bench           # time each command with several hledger versions (BENCHEXES in Makefile)  | ||||||
|  | # stack bench hledger  # time a different set of benchmarks (bench/bench.hs)  | ||||||
|  | # stack bench hledger --ba --criterion  # time more carefully, using criterion  | ||||||
|  | 
 | ||||||
|  | hledger -f examples/100x100x10.journal print | ||||||
|  | hledger -f examples/1000x1000x10.journal print | ||||||
|  | hledger -f examples/10000x1000x10.journal print | ||||||
|  | #hledger -f examples/10000x1000x10.journal print ff | ||||||
|  | hledger -f examples/100000x1000x10.journal print | ||||||
|  | hledger -f examples/100000x1000x10.journal print ff | ||||||
|  | 
 | ||||||
|  | hledger -f examples/100x100x10.journal register | ||||||
|  | hledger -f examples/1000x1000x10.journal register | ||||||
|  | hledger -f examples/10000x1000x10.journal register | ||||||
|  | #hledger -f examples/10000x1000x10.journal register ff | ||||||
|  | hledger -f examples/100000x1000x10.journal register | ||||||
|  | hledger -f examples/100000x1000x10.journal register ff | ||||||
|  | 
 | ||||||
|  | hledger -f examples/100x100x10.journal balance | ||||||
|  | hledger -f examples/1000x1000x10.journal balance | ||||||
|  | hledger -f examples/10000x1000x10.journal balance | ||||||
|  | #hledger -f examples/10000x1000x10.journal balance ff | ||||||
|  | hledger -f examples/100000x1000x10.journal balance | ||||||
|  | hledger -f examples/100000x1000x10.journal balance ff | ||||||
|  | 
 | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user