on 5f6e310 help sign in
bat/tests/benchmarks/run-benchmarks.sh
26 lines 540 B history raw
1#!/bin/bash
3if ! which hyperfine > /dev/null 2>&1; then
4 echo "'hyperfine' does not seem to be installed."
5 echo "You can get it here: https://github.com/sharkdp/hyperfine"
6 exit 1
7fi
9echo "### Startup time"
10echo
12hyperfine --warmup 3 bat
14echo
15echo "### Plain text"
16echo
18hyperfine --warmup 3 "bat --language txt --paging=never 'test-src/jquery-3.3.1.js'"
20echo
21echo "### Time to syntax-highlight large files"
22echo
24for SRC in test-src/*; do
25 hyperfine --warmup 3 "bat --style=full --color=always --paging=never '$SRC'"
26done