leaky-bucket/poc/1-py-ratio1024-log2/test.sh

36 lines
514 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 \
-d 10000 \
-m 0.2