deb-python-rjsmin/bench.sh
ndparker 647b024120 generate benchmark result files automatically
also move playground out of the benchmark suite
2014-02-23 20:02:03 +01:00

29 lines
487 B
Bash
Executable File

#!/bin/bash
set -e
export PYTHONPATH=$PWD
cleanup() {
rm -f -- "$out"
}
out="$(mktemp)"
trap cleanup EXIT
for v in 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5 2.4; do
(
set -e
p=python$v
$p make.py makefile || continue
CFLAGS=-O3 make clean compile
$p -OO bench/main.py -p >( cat - >>"$out" ) bench/*.js
)
done
python make.py makefile
[ "$1" = "-w" ] && \
python -mbench.write \
-p docs/BENCHMARKS \
-t docs/_userdoc/benchmark.txt \
<"$out" \
|| true