File: bench.sh

package info (click to toggle)
python-rjsmin 1.0.12+dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 2,032 kB
  • ctags: 1,029
  • sloc: python: 5,787; ansic: 634; makefile: 28; sh: 24
file content (28 lines) | stat: -rwxr-xr-x 491 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
set -e

export PYTHONPATH=$PWD
cleanup() {
    rm -f -- "$out"
}
out="$(mktemp)"
trap cleanup EXIT

for v in 3.5 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