mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-31 15:12:12 +00:00 
			
		
		
		
	run-benchmarks.sh: Add new test 'Startup time with syntax highlighting'
This commit is contained in:
		
							
								
								
									
										10
									
								
								tests/benchmarks/run-benchmarks.sh
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								tests/benchmarks/run-benchmarks.sh
									
									
									
									
										vendored
									
									
								
							| @@ -93,6 +93,16 @@ hyperfine \ | ||||
| cat "$RESULT_DIR/startup-time.md" >> "$REPORT" | ||||
|  | ||||
|  | ||||
| heading "Startup time with syntax highlighting" | ||||
| hyperfine \ | ||||
| 	"$(printf "%q" "$BAT") --no-config --color=always test-src/small-Markdown-file.md" \ | ||||
| 	--command-name "bat … small-Markdown-file.md" \ | ||||
| 	--warmup "$WARMUP_COUNT" \ | ||||
|     --export-markdown "$RESULT_DIR/startup-time-with-syntax-highlighting.md" \ | ||||
|     --export-json "$RESULT_DIR/startup-time-with-syntax-highlighting.json" | ||||
| cat "$RESULT_DIR/startup-time-with-syntax-highlighting.md" >> "$REPORT" | ||||
|  | ||||
|  | ||||
| heading "Plain-text speed" | ||||
| hyperfine \ | ||||
| 	"$(printf "%q" "$BAT") --no-config --language=txt --style=plain test-src/numpy_test_multiarray.py" \ | ||||
|   | ||||
							
								
								
									
										3
									
								
								tests/benchmarks/test-src/small-Markdown-file.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/benchmarks/test-src/small-Markdown-file.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| # Keep this file small, we want to measure bat startup time, not speed of Markdown highlighting! | ||||
|  | ||||
| The Markdown syntax definition references ~18 other syntaxes, so without lazy-loading, it will be slow to load. | ||||
		Reference in New Issue
	
	Block a user