#!/usr/bin/env bash set -Eeuo pipefail cargo build --release repeat() { local count=$1 local file=$2 local args8=($file $file $file $file $file $file $file $file) local args64=("${args8[@]}" "${args8[@]}" "${args8[@]}" "${args8[@]}" "${args8[@]}" "${args8[@]}" "${args8[@]}" "${args8[@]}") for (( i = 0; i < $count; i++ )); do cat "${args64[@]}" done } echo "No-op" repeat 1000 4-unicode.txt | pv >/dev/null echo "Encoding ASCII" repeat 10 1-original.txt | pv | taskset -c 0 ./target/release/ripmors -e ascii >/dev/null echo "Encoding Unicode" repeat 50 4-unicode.txt | pv | taskset -c 0 ./target/release/ripmors -e unicode >/dev/null echo "Decoding" repeat 2 2-encoded.txt | pv | taskset -c 0 ./target/release/ripmors -d >/dev/null