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"
|
||||
ssh "${sshOptions[@]}" -f "$ipAddress" \
|
||||
"./solana/net/remote/remote-client.sh $deployMethod $entrypointIp \
|
||||
$clientToRun \"$RUST_LOG\" \"$benchTpsExtraArgs\" $clientIndex"
|
||||
$clientToRun \"$RUST_LOG\" \"$benchTpsExtraArgs\" $clientIndex $clientType"
|
||||
) >> "$logFile" 2>&1 || {
|
||||
cat "$logFile"
|
||||
echo "^^^ +++"
|
||||
|
@ -813,6 +813,7 @@ waitForNodeInit=true
|
|||
extraPrimordialStakes=0
|
||||
disableQuic=false
|
||||
enableUdp=false
|
||||
clientType=thin-client
|
||||
|
||||
command=$1
|
||||
[[ -n $command ]] || usage
|
||||
|
@ -948,6 +949,17 @@ while [[ -n $1 ]]; do
|
|||
elif [[ $1 = --skip-require-tower ]]; then
|
||||
maybeSkipRequireTower="$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
|
||||
usage "Unknown long option: $1"
|
||||
fi
|
||||
|
|
|
@ -11,6 +11,7 @@ if [[ -n $4 ]]; then
|
|||
fi
|
||||
benchTpsExtraArgs="$5"
|
||||
clientIndex="$6"
|
||||
clientType="${7:-thin-client}"
|
||||
|
||||
missing() {
|
||||
echo "Error: $1 not specified"
|
||||
|
@ -41,18 +42,52 @@ skip)
|
|||
exit 1
|
||||
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
|
||||
solana-bench-tps)
|
||||
net/scripts/rsync-retry.sh -vPrc \
|
||||
"$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="\
|
||||
solana-bench-tps \
|
||||
--entrypoint $entrypointIp:8001 \
|
||||
--duration 7500 \
|
||||
--sustained \
|
||||
--threads $threadCount \
|
||||
$benchTpsExtraArgs \
|
||||
--read-client-keys ./client-accounts.yml \
|
||||
${args[*]} \
|
||||
"
|
||||
;;
|
||||
idle)
|
||||
|
|
Loading…
Reference in New Issue