mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
tests: make number of samples configurable with -l switch
This commit is contained in:
parent
35f6d162a0
commit
11ecb81ca8
10 changed files with 30 additions and 10 deletions
|
@ -37,7 +37,7 @@ FILTER='*'
|
|||
export NUM_SAMPLES=100
|
||||
|
||||
# Parse command line arguments
|
||||
while getopts ":f:v" OPT; do
|
||||
while getopts ":f:l:v" OPT; do
|
||||
case ${OPT} in
|
||||
f)
|
||||
FILTER=${OPTARG}
|
||||
|
@ -45,6 +45,9 @@ while getopts ":f:v" OPT; do
|
|||
v)
|
||||
VERBOSE=1
|
||||
;;
|
||||
l)
|
||||
NUM_SAMPLES=${OPTARG}
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -${OPTARG}" >&2
|
||||
;;
|
||||
|
|
|
@ -24,10 +24,12 @@
|
|||
|
||||
STATS_FILE=$(mktemp)
|
||||
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-10}
|
||||
|
||||
OFFSET=-10
|
||||
EPSILON=0.05
|
||||
|
||||
villas-signal sine -l 10 -r 10 | villas-hook shift_ts offset=${OFFSET} | villas-hook stats format=\"json\" output=\"${STATS_FILE}\" > /dev/null
|
||||
villas-signal sine -l ${NUM_SAMPLES} -r 10 | villas-hook shift_ts offset=${OFFSET} | villas-hook stats format=\"json\" output=\"${STATS_FILE}\" > /dev/null
|
||||
|
||||
jq .owd ${STATS_FILE}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ function prefix() {
|
|||
|
||||
sed -e "s/^/$P/"
|
||||
}
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-10}
|
||||
|
||||
cat > ${CONFIG_FILE} <<EOF
|
||||
nodes = {
|
||||
|
@ -64,7 +65,7 @@ paths = (
|
|||
EOF
|
||||
|
||||
# Generate test data
|
||||
villas-signal random -l 10 -n > ${INPUT_FILE}
|
||||
villas-signal random -l ${NUM_SAMPLES} -n > ${INPUT_FILE}
|
||||
|
||||
# Start node
|
||||
villas-node ${CONFIG_FILE} 2>&1 | prefix node &
|
||||
|
|
|
@ -26,6 +26,8 @@ CONFIG_FILE=$(mktemp)
|
|||
INPUT_FILE=$(mktemp)
|
||||
OUTPUT_FILE=$(mktemp)
|
||||
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-10}
|
||||
|
||||
URI=https://1Nrd46fZX8HbggT:badpass@rwth-aachen.sciebo.de/public.php/webdav/node/tests/pipe
|
||||
|
||||
cat > ${CONFIG_FILE} <<EOF
|
||||
|
@ -50,7 +52,7 @@ nodes = {
|
|||
}
|
||||
EOF
|
||||
|
||||
villas-signal sine -n -l 10 > ${INPUT_FILE}
|
||||
villas-signal sine -n -l ${NUM_SAMPLES} > ${INPUT_FILE}
|
||||
|
||||
villas-pipe -s ${CONFIG_FILE} remote_file_out < ${INPUT_FILE}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ INPUT_FILE=$(mktemp)
|
|||
OUTPUT_FILE=$(mktemp)
|
||||
NODE_FILE=$(mktemp)
|
||||
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-10}
|
||||
|
||||
cat > ${CONFIG_FILE} << EOF
|
||||
nodes = {
|
||||
node1 = {
|
||||
|
@ -48,7 +50,7 @@ nodes = {
|
|||
EOF
|
||||
|
||||
# Generate test data
|
||||
villas-signal random -l 10 -n > ${INPUT_FILE}
|
||||
villas-signal random -l ${NUM_SAMPLES} -n > ${INPUT_FILE}
|
||||
|
||||
# We delay EOF of the INPUT_FILE by 1 second in order to wait for incoming data to be received
|
||||
villas-pipe ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < <(cat ${INPUT_FILE}; sleep 0.5; echo -n)
|
||||
|
|
|
@ -26,6 +26,8 @@ CONFIG_FILE=$(mktemp)
|
|||
INPUT_FILE=$(mktemp)
|
||||
OUTPUT_FILE=$(mktemp)
|
||||
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-10}
|
||||
|
||||
cat > ${CONFIG_FILE} << EOF
|
||||
nodes = {
|
||||
node1 = {
|
||||
|
@ -46,7 +48,7 @@ nodes = {
|
|||
EOF
|
||||
|
||||
# Generate test data
|
||||
villas-signal random -l 10 -n > ${INPUT_FILE}
|
||||
villas-signal random -l ${NUM_SAMPLES} -n > ${INPUT_FILE}
|
||||
|
||||
# We delay EOF of the INPUT_FILE by 1 second in order to wait for incoming data to be received
|
||||
villas-pipe ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < <(sleep 0.5; cat ${INPUT_FILE}; sleep 0.5; echo -n)
|
||||
|
|
|
@ -26,6 +26,8 @@ CONFIG_FILE=$(mktemp)
|
|||
INPUT_FILE=$(mktemp)
|
||||
OUTPUT_FILE=$(mktemp)
|
||||
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-10}
|
||||
|
||||
cat > ${CONFIG_FILE} << EOF
|
||||
nodes = {
|
||||
node1 = {
|
||||
|
@ -38,7 +40,7 @@ nodes = {
|
|||
EOF
|
||||
|
||||
# Generate test data
|
||||
villas-signal random -l 10 -n > ${INPUT_FILE}
|
||||
villas-signal random -l ${NUM_SAMPLES} -n > ${INPUT_FILE}
|
||||
|
||||
# We delay EOF of the INPUT_FILE by 1 second in order to wait for incoming data to be received
|
||||
villas-pipe ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < <(sleep 0.5; cat ${INPUT_FILE}; sleep 0.5; echo -n)
|
||||
|
|
|
@ -26,6 +26,8 @@ CONFIG_FILE=$(mktemp)
|
|||
INPUT_FILE=$(mktemp)
|
||||
OUTPUT_FILE=$(mktemp)
|
||||
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-10}
|
||||
|
||||
for POLLING in true false; do
|
||||
for VECTORIZE in 1 5 20; do
|
||||
|
||||
|
@ -44,7 +46,7 @@ nodes = {
|
|||
EOF
|
||||
|
||||
# Generate test data
|
||||
villas-signal random -l 20 -n > ${INPUT_FILE}
|
||||
villas-signal random -l ${NUM_SAMPLES} -n > ${INPUT_FILE}
|
||||
|
||||
# We delay EOF of the INPUT_FILE by 1 second in order to wait for incoming data to be received
|
||||
villas-pipe ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < <(cat ${INPUT_FILE}; sleep 1; echo -n)
|
||||
|
|
|
@ -27,8 +27,10 @@ INPUT_FILE=$(mktemp)
|
|||
OUTPUT_FILE=$(mktemp)
|
||||
THEORIES=$(mktemp)
|
||||
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-10}
|
||||
|
||||
# Generate test data
|
||||
villas-signal random -l 10 -n > ${INPUT_FILE}
|
||||
villas-signal random -l ${NUM_SAMPLES} -n > ${INPUT_FILE}
|
||||
|
||||
for LAYER in udp ip eth; do
|
||||
for HEADER in none default; do
|
||||
|
|
|
@ -26,6 +26,8 @@ CONFIG_FILE=$(mktemp)
|
|||
INPUT_FILE=$(mktemp)
|
||||
OUTPUT_FILE=$(mktemp)
|
||||
|
||||
NUM_SAMPLES=${NUM_SAMPLES:-10}
|
||||
|
||||
cat > ${CONFIG_FILE} << EOF
|
||||
nodes = {
|
||||
node1 = {
|
||||
|
@ -39,7 +41,7 @@ nodes = {
|
|||
EOF
|
||||
|
||||
# Generate test data
|
||||
villas-signal random -l 10 -n > ${INPUT_FILE}
|
||||
villas-signal random -l ${NUM_SAMPLES} -n > ${INPUT_FILE}
|
||||
|
||||
# We delay EOF of the INPUT_FILE by 1 second in order to wait for incoming data to be received
|
||||
villas-pipe ${CONFIG_FILE} node1 > ${OUTPUT_FILE} < <(sleep 0.5; cat ${INPUT_FILE}; sleep 0.5; echo -n)
|
||||
|
|
Loading…
Add table
Reference in a new issue