Add simple benchmark scripts

This commit is contained in:
sharkdp
2018-05-14 21:42:07 +02:00
committed by David Peter
parent a5de77af4d
commit 54b33c8c21
5 changed files with 10993 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
if ! which hyperfine > /dev/null 2>&1; then
echo "'hyperfine' does not seem to be installed."
echo "You can get it here: https://github.com/sharkdp/hyperfine"
exit 1
fi
echo "### Startup time"
echo
hyperfine --warmup 3 bat
echo
echo "### Plain text"
echo
hyperfine --warmup 3 "bat --language txt --paging=never 'test-src/jquery-3.3.1.js'"
echo
echo "### Time to syntax-highlight large files"
echo
for SRC in test-src/*; do
hyperfine --warmup 3 "bat --style=full --color=always --paging=never '$SRC'"
done