Files
coturn/examples/loadtest/invalid_flood.sh
T
Pavel Punsky 69bc0e7351 Load generator mode in turnutils_uclient (#1894)
## Summary

Adds load-generator modes to `turnutils_uclient` for repeatable TURN
server performance testing:

- Adds `-Y packet|alloc|invalid` load modes.
- Supports packet flood, allocation flood, and invalid-packet flood
workflows.
- Adds unique local client ports for allocation flood mode.
- Removes default packet pacing in load-generator modes unless
explicitly set.
- Adds helper scripts under `examples/loadtest/`.
- Documents load-test usage in `README.turnutils`,
`man/man1/turnutils.1`, `CLAUDE.md`, and
`docs/PerformanceIterationLog.md`.

The performance log captures DigitalOcean benchmark methodology, A/B
lessons, hot-path findings, and future optimization candidates.
2026-05-03 22:03:08 -07:00

42 lines
825 B
Bash
Executable File

#!/bin/bash
set -eu
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
REPO_ROOT="$(CDPATH= cd -- "${SCRIPT_DIR}/../.." && pwd)"
BINDIR="${REPO_ROOT}/build/bin"
if [ ! -x "${BINDIR}/turnserver" ]; then
BINDIR="${REPO_ROOT}/bin"
fi
cleanup() {
kill "${uclient_pid:-}" "${turnserver_pid:-}" 2>/dev/null || true
wait "${uclient_pid:-}" "${turnserver_pid:-}" 2>/dev/null || true
}
trap cleanup EXIT INT TERM
# "${BINDIR}/turnserver" \
# --use-auth-secret \
# --static-auth-secret=secret \
# --realm=north.gov \
# --allow-loopback-peers \
# --listening-ip=127.0.0.1 \
# --relay-ip=127.0.0.1 \
# > /dev/null 2>&1 &
# turnserver_pid=$!
sleep 2
"${BINDIR}/turnutils_uclient" \
-Y invalid \
-m 50 \
-l 16 \
-u user \
-W secret \
"$@" \
127.0.0.1 &
uclient_pid=$!
wait "${uclient_pid}"