Skip to content

Commit

Permalink
Save experiment script files.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry73204 committed Dec 29, 2023
1 parent 8f4987b commit f5b5514
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scripts/pub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$script_dir/.."

payload="$1"
shift || {
echo "Usage: $0 PAYLOAD_SIZE PRIORITY..." >&2
exit 1
}

for prio in $@; do
port=$((7440+prio))
echo ./target/fast/examples/z_pub_thr "$payload" -e "tcp/0.0.0.0:$port" -p "$prio"
done | parallel --lb -j0
9 changes: 9 additions & 0 deletions scripts/sub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$script_dir/.."

for prio in $@; do
port=$((7440+prio))
echo ./target/fast/examples/z_sub_thr -l "tcp/0.0.0.0:$port"
done | parallel --lb -j0

0 comments on commit f5b5514

Please sign in to comment.