run-benchmarks.sh: Add new test 'Startup time with syntax highlighting'

This commit is contained in:
Martin Nordholts 2021-11-25 21:20:38 +01:00
parent 9a2979df5f
commit 206bf5b8d6
2 changed files with 13 additions and 0 deletions

View File

@ -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" \

View 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.