tests: Measure ascii perf

This commit is contained in:
Ed Page 2021-05-21 18:24:24 -05:00
parent 5eb4665c83
commit 8863874e33

View file

@ -96,9 +96,11 @@ function bench_dir() {
rg_j1_command="$rg_path --threads 1 bin $path"
fi
typos_command=""
typos_ascii_command=""
typos_j1_command=""
if [[ ! -z $typos_path ]]; then
typos_command="$typos_path $path"
typos_ascii_command="$typos_path --no-unicode $path"
typos_j1_command="$typos_path --threads 1 $path"
fi
misspell_rs_command=""
@ -114,7 +116,7 @@ function bench_dir() {
if [[ ! -z $codespell_path ]]; then
codespell_command="$codespell_path $path"
fi
hyperfine --warmup 1 -i --export-json $report_prefix-rg.json --export-markdown $report_prefix-rg.md "$rg_command" "$rg_j1_command" "$typos_command" "$typos_j1_command" "$misspell_rs_command" "$misspell_go_command" "$codespell_command"
hyperfine --warmup 1 -i --export-json $report_prefix-rg.json --export-markdown $report_prefix-rg.md "$rg_command" "$rg_j1_command" "$typos_command" "$typos_ascii_command" "$typos_j1_command" "$misspell_rs_command" "$misspell_go_command" "$codespell_command"
cat $report_prefix-rg.md >> $output
fi
echo "" >> $output
@ -139,8 +141,10 @@ function bench_file() {
rg_command="$rg_path bin $path"
fi
typos_command=""
typos_ascii_command=""
if [[ ! -z $typos_path ]]; then
typos_command="$typos_path $path"
typos_ascii_command="$typos_path --no-unicode $path"
fi
misspell_rs_command=""
if [[ ! -z $misspell_rs_path ]]; then
@ -158,7 +162,7 @@ function bench_file() {
if [[ ! -z $codespell_path ]]; then
codespell_command="$codespell_path $path"
fi
hyperfine --warmup 1 -i --export-json $report_prefix-rg.json --export-markdown $report_prefix-rg.md "$rg_command" "$typos_command" "$misspell_rs_command" "$misspell_go_command" "$scspell_command" "$codespell_command"
hyperfine --warmup 1 -i --export-json $report_prefix-rg.json --export-markdown $report_prefix-rg.md "$rg_command" "$typos_command" "$typos_ascii_command" "$misspell_rs_command" "$misspell_go_command" "$scspell_command" "$codespell_command"
cat $report_prefix-rg.md >> $output
fi
echo "" >> $output