Skip to content

Commit

Permalink
🔨 Update quickfix-client latency.sh script to read username and passw…
Browse files Browse the repository at this point in the history
…ord from users.txt file
  • Loading branch information
SamuelGuillemet committed Feb 9, 2024
1 parent 9697bab commit 7fb0973
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion clients/quickfix-client/latency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ fi

num_clients=$1

# Read username password from users.txt file
# format is username password

for ((i = 0; i < num_clients; i++)); do
# Start the client
poetry run python broker_quickfix_client/main.py --username user$i &
username=$(sed -n "$((i + 1))p" users.txt | awk '{print $1}')
password=$(sed -n "$((i + 1))p" users.txt | awk '{print $2}')
echo "Starting client $username"
poetry run python broker_quickfix_client/main.py --username $username --password $password &
done

# Wait for the clients to finish
Expand Down

0 comments on commit 7fb0973

Please sign in to comment.