Add documentation

This commit is contained in:
sharkdp 2020-04-12 17:41:12 +02:00 committed by David Peter
parent f2cef702a0
commit fc6f4f31dd
1 changed files with 15 additions and 1 deletions

View File

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