Make /tools/improve script measure speed 5 times and compute an average

I measured speed 5 times manually too before introducing the script. It
gives more stable results.
redux
David Majda 13 years ago
parent d0c96481bf
commit 2d4ee4fb23

@ -12,10 +12,17 @@ prepare() {
jake build
}
measure_speed() {
run_benchmark() {
echo $(jake benchmark | awk 'BEGIN { FS = " *│ *" } /Total/ { split($5, a, " "); print a[1] }')
}
measure_speed() {
bc <<-EOT
scale = 2
($(run_benchmark) + $(run_benchmark) + $(run_benchmark) + $(run_benchmark) + $(run_benchmark)) / 5
EOT
}
measure_size() {
for file in examples/*.pegjs; do
bin/pegjs "$file"

Loading…
Cancel
Save