-
-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added a test script to get a performance baseline
- Loading branch information
1 parent
7eeaa16
commit 24beb03
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
if ! [ -x "$(command -v iperf3)" ]; then | ||
echo 'Error: iperf3 is not installed.' >&2 | ||
exit 1 | ||
fi | ||
|
||
set -e | ||
|
||
if [ -z "${OCKAM}" ]; then | ||
RUSTFLAGS="-C force-frame-pointers=yes" cargo build --profile profiling -p ockam_command -F ockam_vault/aws-lc | ||
OCKAM=target/profiling/ockam | ||
fi | ||
|
||
"${OCKAM}" node delete portal -y >/dev/null 2>&1 || true | ||
export OCKAM_LOG_LEVEL=info | ||
export OCKAM_OPENTELEMETRY_EXPORT=0 | ||
|
||
"${OCKAM}" node create portal -f & | ||
|
||
sleep 2 | ||
"${OCKAM}" tcp-outlet create --to 5500 --at portal | ||
"${OCKAM}" tcp-inlet create --from 8200 --to /secure/api/service/outlet --at portal | ||
|
||
iperf3 --server --port 5500 --one-off & | ||
iperf3_server_pid=$! | ||
|
||
sleep 0.3 # wait for server to start | ||
iperf3 --zerocopy --client 127.0.0.1 --port 8200 --time 60 | ||
|
||
kill ${iperf3_server_pid} || true | ||
"${OCKAM}" node delete portal -y |