@@ -1,9 +1,23 @@
3+# This script goes through all languages that are supported by 'bat'. For each
4+# language, it loops over the correspoinding file extensions and searches a
5+# given folder for matching files. It calls 'bat' for each of these files and
6+# measures the highlighting speed (number of characters per second). The script
7+# reports files which lead to slow highlighting speeds or errors during the
10+# Requirements (external programs):
11+# - bat (in the $PATH)
12+# - fd (https://github.com/sharkdp/fd)
1import time
15import time
3import subprocess as sp
17import subprocess as sp
6−# Threshold speed in chars per second
20+# Threshold speed, characters per second
7THRESHOLD_SPEED = 20000
21THRESHOLD_SPEED = 20000
9# Maximum time we allow `bat` to run
23# Maximum time we allow `bat` to run