bench-tps will now generate an ephemeral identity if not provided with one
Also simplify scripts as a result
This commit is contained in:
parent
aecb06cd2a
commit
c4b8f0cd2f
|
@ -20,10 +20,7 @@ usage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -z $1 ]]; then # default behavior
|
if [[ -z $1 ]]; then # default behavior
|
||||||
mkdir -p config-client/
|
|
||||||
$solana_keygen -o config-client/client-id.json
|
|
||||||
$solana_bench_tps \
|
$solana_bench_tps \
|
||||||
--identity config-client/client-id.json \
|
|
||||||
--network 127.0.0.1:8001 \
|
--network 127.0.0.1:8001 \
|
||||||
--drone 127.0.0.1:9900 \
|
--drone 127.0.0.1:9900 \
|
||||||
--duration 90 \
|
--duration 90 \
|
||||||
|
|
|
@ -133,5 +133,4 @@ tune_networking() {
|
||||||
SOLANA_CONFIG_DIR=${SNAP_DATA:-$PWD}/config
|
SOLANA_CONFIG_DIR=${SNAP_DATA:-$PWD}/config
|
||||||
SOLANA_CONFIG_PRIVATE_DIR=${SNAP_DATA:-$PWD}/config-private
|
SOLANA_CONFIG_PRIVATE_DIR=${SNAP_DATA:-$PWD}/config-private
|
||||||
SOLANA_CONFIG_VALIDATOR_DIR=${SNAP_DATA:-$PWD}/config-validator
|
SOLANA_CONFIG_VALIDATOR_DIR=${SNAP_DATA:-$PWD}/config-validator
|
||||||
SOLANA_CONFIG_CLIENT_DIR=${SNAP_USER_DATA:-$PWD}/config-client
|
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ snap)
|
||||||
sudo snap install solana.snap --devmode --dangerous
|
sudo snap install solana.snap --devmode --dangerous
|
||||||
|
|
||||||
solana_bench_tps=/snap/bin/solana.bench-tps
|
solana_bench_tps=/snap/bin/solana.bench-tps
|
||||||
solana_keygen=/snap/bin/solana.keygen
|
|
||||||
;;
|
;;
|
||||||
local|tar)
|
local|tar)
|
||||||
PATH="$HOME"/.cargo/bin:"$PATH"
|
PATH="$HOME"/.cargo/bin:"$PATH"
|
||||||
|
@ -44,7 +43,6 @@ local|tar)
|
||||||
|
|
||||||
net/scripts/rsync-retry.sh -vPrc "$entrypointIp:~/.cargo/bin/solana*" ~/.cargo/bin/
|
net/scripts/rsync-retry.sh -vPrc "$entrypointIp:~/.cargo/bin/solana*" ~/.cargo/bin/
|
||||||
solana_bench_tps=solana-bench-tps
|
solana_bench_tps=solana-bench-tps
|
||||||
solana_keygen=solana-keygen
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown deployment method: $deployMethod"
|
echo "Unknown deployment method: $deployMethod"
|
||||||
|
@ -60,19 +58,12 @@ clientCommand="\
|
||||||
$solana_bench_tps \
|
$solana_bench_tps \
|
||||||
--network $entrypointIp:8001 \
|
--network $entrypointIp:8001 \
|
||||||
--drone $entrypointIp:9900 \
|
--drone $entrypointIp:9900 \
|
||||||
--identity client.json \
|
|
||||||
--duration 7500 \
|
--duration 7500 \
|
||||||
--sustained \
|
--sustained \
|
||||||
--threads $threadCount \
|
--threads $threadCount \
|
||||||
"
|
"
|
||||||
|
|
||||||
keygenCommand="$solana_keygen -o client.json"
|
|
||||||
tmux new -s solana-bench-tps -d "
|
tmux new -s solana-bench-tps -d "
|
||||||
[[ -r client.json ]] || {
|
|
||||||
echo '$ $keygenCommand' | tee -a client.log
|
|
||||||
$keygenCommand >> client.log 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
echo === Client start: \$(date) | tee -a client.log
|
echo === Client start: \$(date) | tee -a client.log
|
||||||
$metricsWriteDatapoint 'testnet-deploy client-begin=1'
|
$metricsWriteDatapoint 'testnet-deploy client-begin=1'
|
||||||
|
|
|
@ -539,7 +539,6 @@ fn main() {
|
||||||
.long("identity")
|
.long("identity")
|
||||||
.value_name("PATH")
|
.value_name("PATH")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.required(true)
|
|
||||||
.help("File containing a client identity (keypair)"),
|
.help("File containing a client identity (keypair)"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
|
@ -609,8 +608,11 @@ fn main() {
|
||||||
addr
|
addr
|
||||||
};
|
};
|
||||||
|
|
||||||
let id =
|
let id = if matches.is_present("identity") {
|
||||||
read_keypair(matches.value_of("identity").unwrap()).expect("can't read client identity");
|
read_keypair(matches.value_of("identity").unwrap()).expect("can't read client identity")
|
||||||
|
} else {
|
||||||
|
Keypair::new()
|
||||||
|
};
|
||||||
|
|
||||||
let threads = if let Some(t) = matches.value_of("threads") {
|
let threads = if let Some(t) = matches.value_of("threads") {
|
||||||
t.to_string().parse().expect("can't parse threads")
|
t.to_string().parse().expect("can't parse threads")
|
||||||
|
|
Loading…
Reference in New Issue