Generify bench

This commit is contained in:
Wilson Lin 2021-08-08 21:01:37 +10:00
commit a28e69ddb0
55 changed files with 618 additions and 396 deletions

3
debug/diff/compare.sh Normal file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
git --no-pager diff --no-index --word-diff=color --word-diff-regex=. "min/html-minifier/$1.html" "min/@minify-html/js/$1.html" | less

1
debug/prof/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/perf.data*

12
debug/prof/profile.sh Normal file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e
shopt -s nullglob
for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
echo performance | sudo dd status=none of="$i"
done
rm -f perf.data
sudo perf record -g nice -n -20 taskset -c 1 minify-html-bench/target/release/minify-html-bench --tests tests --iterations 512
sudo chown "$USER:$USER" perf.data