Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | #!/bin/bash |
michael@0 | 2 | |
michael@0 | 3 | MODE=compare |
michael@0 | 4 | if [[ "$1" == "--seq" ]]; then |
michael@0 | 5 | MODE=seq |
michael@0 | 6 | shift |
michael@0 | 7 | elif [[ "$1" == "--par" ]]; then |
michael@0 | 8 | MODE=par |
michael@0 | 9 | shift |
michael@0 | 10 | fi |
michael@0 | 11 | |
michael@0 | 12 | if [[ -z "$1" ]] || [[ "$1" == "--help" ]]; then |
michael@0 | 13 | echo "Usage: run.sh [--seq | --par] path-to-shell paths-to-test" |
michael@0 | 14 | echo "" |
michael@0 | 15 | echo "Runs the given benchmark(s) using the given shell and " |
michael@0 | 16 | echo "prints the results. If -seq or -par is supplied, " |
michael@0 | 17 | echo "only runs sequentially or in parallel. Otherwise, runs both" |
michael@0 | 18 | echo "and compares the performance." |
michael@0 | 19 | fi |
michael@0 | 20 | |
michael@0 | 21 | D="$(dirname $0)" |
michael@0 | 22 | S="$1" |
michael@0 | 23 | shift |
michael@0 | 24 | for T in "$@"; do |
michael@0 | 25 | echo "$S" --ion-parallel-compile=on -e "'"'var libdir="'$D'/"; var MODE="'$MODE'";'"'" "$T" |
michael@0 | 26 | "$S" --ion-parallel-compile=on -e 'var libdir="'$D'/"; var MODE="'$MODE'";' "$T" |
michael@0 | 27 | done |