Mercurial > genshi > mirror
comparison run_benchmarks.sh @ 1010:01c29a07522d trunk
Add script for running benchmarks.
author | hodgestar |
---|---|
date | Thu, 21 Mar 2013 21:38:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1005:2e2d67621904 | 1010:01c29a07522d |
---|---|
1 #!/bin/sh | |
2 # | |
3 # 1. Run the tests with `tox` (this will set up all the tox envs). | |
4 # 2. ./run_benchmarks.sh <env-name> | tee results-<env-name>.out | |
5 | |
6 NAME="$1" | |
7 PYTHON="./.tox/$NAME/bin/python" | |
8 BENCH_DIR="bench_build/$1" | |
9 BENCH_BIN_DIR="$BENCH_DIR/bin" | |
10 mkdir -p "bench_build" | |
11 | |
12 rm -rf "$BENCH_DIR" | |
13 cp -R "examples/bench" "$BENCH_DIR" | |
14 | |
15 case "$NAME" in | |
16 py32|py33) | |
17 2to3 -w --no-diffs "$BENCH_DIR" | |
18 ;; | |
19 esac | |
20 | |
21 echo "-- basic --" | |
22 "$PYTHON" "$BENCH_DIR/basic.py" | |
23 echo | |
24 | |
25 echo "-- bigtable --" | |
26 "$PYTHON" "$BENCH_DIR/bigtable.py" | |
27 echo | |
28 | |
29 echo "-- xpath --" | |
30 "$PYTHON" "$BENCH_DIR/xpath.py" | |
31 echo |