js/src/parjs-benchmarks/run.sh

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rwxr-xr-x

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 #!/bin/bash
     3 MODE=compare
     4 if [[ "$1" == "--seq" ]]; then
     5     MODE=seq
     6     shift
     7 elif [[ "$1" == "--par" ]]; then
     8     MODE=par
     9     shift
    10 fi
    12 if [[ -z "$1" ]] || [[ "$1" == "--help" ]]; then
    13     echo "Usage: run.sh [--seq | --par] path-to-shell paths-to-test"
    14     echo ""
    15     echo "Runs the given benchmark(s) using the given shell and "
    16     echo "prints the results.  If -seq or -par is supplied, "
    17     echo "only runs sequentially or in parallel.  Otherwise, runs both"
    18     echo "and compares the performance."
    19 fi
    21 D="$(dirname $0)"
    22 S="$1"
    23 shift
    24 for T in "$@"; do
    25     echo "$S" --ion-parallel-compile=on -e "'"'var libdir="'$D'/"; var MODE="'$MODE'";'"'" "$T"
    26     "$S" --ion-parallel-compile=on -e 'var libdir="'$D'/"; var MODE="'$MODE'";' "$T"
    27 done

mercurial