Edgewall Software

source: trunk/run_benchmarks.sh

Last change on this file was 1237, checked in by hodgestar, 11 years ago

Add script for running benchmarks.

File size: 582 bytes
RevLine 
[1237]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
6NAME="$1"
7PYTHON="./.tox/$NAME/bin/python"
8BENCH_DIR="bench_build/$1"
9BENCH_BIN_DIR="$BENCH_DIR/bin"
10mkdir -p "bench_build"
11
12rm -rf "$BENCH_DIR"
13cp -R "examples/bench" "$BENCH_DIR"
14
15case "$NAME" in
16  py32|py33)
17    2to3 -w --no-diffs "$BENCH_DIR"
18    ;;
19esac
20
21echo "-- basic --"
22"$PYTHON" "$BENCH_DIR/basic.py" 
23echo
24
25echo "-- bigtable --"
26"$PYTHON" "$BENCH_DIR/bigtable.py"
27echo
28
29echo "-- xpath --"
30"$PYTHON" "$BENCH_DIR/xpath.py"
31echo
Note: See TracBrowser for help on using the repository browser.