-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-benchmark.sh
30 lines (22 loc) · 1016 Bytes
/
setup-benchmark.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
if [ "$#" -ne 3 ]; then
echo "Usage: $0 <concurrentFetches> <outConnections> <pendingOutConnections>"
exit 1
fi
if ! [[ "$1" =~ ^[0-9]+$ ]] || ! [[ "$2" =~ ^[0-9]+$ ]] || ! [[ "$3" =~ ^[0-9]+$ ]]; then
echo "Error: All arguments must be valid numbers."
exit 1
fi
concurrentFetches=$1
outConnections=$2
pendingOutConnections=$3
echo "Running benchmark with $concurrentFetches concurrent fetches, $outConnections out connections, and $pendingOutConnections pending out connections..."
export MAX_SIMULTANEOUS_FETCHES=$concurrentFetches
export OUT_CONNECTIONS=$outConnections
export PENDING_OUT_CONNECTIONS=$pendingOutConnections
export RUST_LOG=subspace_data_retrieval=trace,subspace_networking::utils::piece_provider=trace
COMPOSE='docker compose --env-file .env -f docker/file-retriever/docker-compose.yml -f docker/object-mapping-indexer/docker-compose.yml -f docker/dev/docker.compose.db.yml'
$COMPOSE down
$COMPOSE up --build -d
echo "Waiting for gateway to start..."
sleep 120