leaky-bucket/poc/2-py-rps/test.sh

34 lines
488 B
Bash

#! /bin/bash
set -e
set -o pipefail
peek() {
while read -r line; do
echo $line
#echo $line >&2
done
}
cleanup() {
kill -9 $(jobs -p) || true
}
trap cleanup EXIT
python3 ./state_to_buttons.py &
python3 ./testdata/rand_0_n_weighted_stream.py \
-n 6 \
-b-min 1 \
-b-max 10 \
-d-min 100 \
-d-max 3000 \
-between 100 \
-b-min 10 \
-b-max 100 \
-d-min 100 \
-d-max 3000 \
-between 10 \
-w 3 \
| peek \
| python3 ./stream_to_state.py