#!/bin/bash

set -x

# This is the number of compression+decompression times to average
reps="$1"

(
    /usr/bin/python ./test-perf "$reps"
    /usr/local/cpython-2.6/bin/python ./test-perf "$reps"
    /usr/local/cpython-2.7/bin/python ./test-perf "$reps"
    /usr/local/pypy-5.9.0/bin/pypy ./test-perf "$reps"
    /usr/local/pypy-5.10.0/bin/pypy ./test-perf "$reps"
    /usr/bin/python3 ./test-perf "$reps"
    /usr/local/pypy3-5.9.0/bin/pypy3 ./test-perf "$reps"
    /usr/local/pypy3-5.10.0/bin/pypy3 ./test-perf "$reps"
    /usr/local/cpython-3.3/bin/python ./test-perf "$reps"
    /usr/local/cpython-3.4/bin/python ./test-perf "$reps"
    /usr/local/cpython-3.5/bin/python ./test-perf "$reps"
    /usr/local/cpython-3.6/bin/python ./test-perf "$reps"
) | \
    sort -nr