Add ability to choose client type in GCE cluster scripts (#28708)
* Update scripts to add the --client-type [thin-client, tpu-client, rpc-client] option
This commit is contained in:
parent
d0f736a0d9
commit
06fa6dd9ab
14
net/net.sh
14
net/net.sh
|
@ -425,7 +425,7 @@ startClient() {
|
||||||
startCommon "$ipAddress"
|
startCommon "$ipAddress"
|
||||||
ssh "${sshOptions[@]}" -f "$ipAddress" \
|
ssh "${sshOptions[@]}" -f "$ipAddress" \
|
||||||
"./solana/net/remote/remote-client.sh $deployMethod $entrypointIp \
|
"./solana/net/remote/remote-client.sh $deployMethod $entrypointIp \
|
||||||
$clientToRun \"$RUST_LOG\" \"$benchTpsExtraArgs\" $clientIndex"
|
$clientToRun \"$RUST_LOG\" \"$benchTpsExtraArgs\" $clientIndex $clientType"
|
||||||
) >> "$logFile" 2>&1 || {
|
) >> "$logFile" 2>&1 || {
|
||||||
cat "$logFile"
|
cat "$logFile"
|
||||||
echo "^^^ +++"
|
echo "^^^ +++"
|
||||||
|
@ -813,6 +813,7 @@ waitForNodeInit=true
|
||||||
extraPrimordialStakes=0
|
extraPrimordialStakes=0
|
||||||
disableQuic=false
|
disableQuic=false
|
||||||
enableUdp=false
|
enableUdp=false
|
||||||
|
clientType=thin-client
|
||||||
|
|
||||||
command=$1
|
command=$1
|
||||||
[[ -n $command ]] || usage
|
[[ -n $command ]] || usage
|
||||||
|
@ -948,6 +949,17 @@ while [[ -n $1 ]]; do
|
||||||
elif [[ $1 = --skip-require-tower ]]; then
|
elif [[ $1 = --skip-require-tower ]]; then
|
||||||
maybeSkipRequireTower="$1"
|
maybeSkipRequireTower="$1"
|
||||||
shift 1
|
shift 1
|
||||||
|
elif [[ $1 = --client-type ]]; then
|
||||||
|
clientType=$2
|
||||||
|
case "$clientType" in
|
||||||
|
thin-client|tpu-client|rpc-client)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unexpected client type: \"$clientType\""
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift 2
|
||||||
else
|
else
|
||||||
usage "Unknown long option: $1"
|
usage "Unknown long option: $1"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -11,6 +11,7 @@ if [[ -n $4 ]]; then
|
||||||
fi
|
fi
|
||||||
benchTpsExtraArgs="$5"
|
benchTpsExtraArgs="$5"
|
||||||
clientIndex="$6"
|
clientIndex="$6"
|
||||||
|
clientType="${7:-thin-client}"
|
||||||
|
|
||||||
missing() {
|
missing() {
|
||||||
echo "Error: $1 not specified"
|
echo "Error: $1 not specified"
|
||||||
|
@ -41,18 +42,52 @@ skip)
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
TPU_CLIENT=false
|
||||||
|
RPC_CLIENT=false
|
||||||
|
case "$clientType" in
|
||||||
|
thin-client)
|
||||||
|
TPU_CLIENT=false
|
||||||
|
RPC_CLIENT=false
|
||||||
|
;;
|
||||||
|
tpu-client)
|
||||||
|
TPU_CLIENT=true
|
||||||
|
RPC_CLIENT=false
|
||||||
|
;;
|
||||||
|
rpc-client)
|
||||||
|
TPU_CLIENT=false
|
||||||
|
RPC_CLIENT=true
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unexpected clientType: \"$clientType\""
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
case $clientToRun in
|
case $clientToRun in
|
||||||
solana-bench-tps)
|
solana-bench-tps)
|
||||||
net/scripts/rsync-retry.sh -vPrc \
|
net/scripts/rsync-retry.sh -vPrc \
|
||||||
"$entrypointIp":~/solana/config/bench-tps"$clientIndex".yml ./client-accounts.yml
|
"$entrypointIp":~/solana/config/bench-tps"$clientIndex".yml ./client-accounts.yml
|
||||||
|
|
||||||
|
args=()
|
||||||
|
|
||||||
|
if ${TPU_CLIENT}; then
|
||||||
|
args+=(--use-tpu-client)
|
||||||
|
args+=(--url "$entrypointIp:8899")
|
||||||
|
elif ${RPC_CLIENT}; then
|
||||||
|
args+=(--use-rpc-client)
|
||||||
|
args+=(--url "$entrypointIp:8899")
|
||||||
|
else
|
||||||
|
args+=(--entrypoint "$entrypointIp:8001")
|
||||||
|
fi
|
||||||
|
|
||||||
clientCommand="\
|
clientCommand="\
|
||||||
solana-bench-tps \
|
solana-bench-tps \
|
||||||
--entrypoint $entrypointIp:8001 \
|
|
||||||
--duration 7500 \
|
--duration 7500 \
|
||||||
--sustained \
|
--sustained \
|
||||||
--threads $threadCount \
|
--threads $threadCount \
|
||||||
$benchTpsExtraArgs \
|
$benchTpsExtraArgs \
|
||||||
--read-client-keys ./client-accounts.yml \
|
--read-client-keys ./client-accounts.yml \
|
||||||
|
${args[*]} \
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
idle)
|
idle)
|
||||||
|
|
Loading…
Reference in New Issue