Fix args in validator script, readme version, client-demo perf print
This commit is contained in:
parent
216510c573
commit
4a44498d45
|
@ -100,7 +100,7 @@ To run a performance-enhanced fullnode on Linux, download `libcuda_verify_ed2551
|
||||||
it by adding `--features=cuda` to the line that runs `solana-fullnode` in `leader.sh`.
|
it by adding `--features=cuda` to the line that runs `solana-fullnode` in `leader.sh`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ wget https://solana-build-artifacts.s3.amazonaws.com/v0.6.0/libcuda_verify_ed25519.a
|
$ wget https://solana-build-artifacts.s3.amazonaws.com/v0.5.0/libcuda_verify_ed25519.a
|
||||||
cargo run --release --features=cuda --bin solana-fullnode -- -l leader.json < genesis.log
|
cargo run --release --features=cuda --bin solana-fullnode -- -l leader.json < genesis.log
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -175,38 +175,63 @@ fn main() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let sample_period = 1; // in seconds
|
||||||
println!("Sampling tps every second...",);
|
println!("Sampling tps every second...",);
|
||||||
validators.into_par_iter().for_each(|val| {
|
let maxes: Vec<_> = validators
|
||||||
let mut client = mk_client(&client_addr, &val);
|
.into_par_iter()
|
||||||
let mut now = Instant::now();
|
.map(|val| {
|
||||||
let mut initial_tx_count = client.transaction_count();
|
let mut client = mk_client(&client_addr, &val);
|
||||||
for i in 0..100 {
|
let mut now = Instant::now();
|
||||||
let tx_count = client.transaction_count();
|
let mut initial_tx_count = client.transaction_count();
|
||||||
let duration = now.elapsed();
|
let mut max_tps = 0.0;
|
||||||
now = Instant::now();
|
let mut total = 0;
|
||||||
let sample = tx_count - initial_tx_count;
|
for i in 0..100 {
|
||||||
initial_tx_count = tx_count;
|
let tx_count = client.transaction_count();
|
||||||
println!(
|
let duration = now.elapsed();
|
||||||
"{}: Transactions processed {}",
|
now = Instant::now();
|
||||||
val.transactions_addr, sample
|
let sample = tx_count - initial_tx_count;
|
||||||
);
|
initial_tx_count = tx_count;
|
||||||
let ns = duration.as_secs() * 1_000_000_000 + u64::from(duration.subsec_nanos());
|
println!(
|
||||||
let tps = (sample * 1_000_000_000) as f64 / ns as f64;
|
"{}: Transactions processed {}",
|
||||||
println!("{}: {} tps", val.transactions_addr, tps);
|
val.transactions_addr, sample
|
||||||
let total = tx_count - first_count;
|
);
|
||||||
println!(
|
let ns = duration.as_secs() * 1_000_000_000 + u64::from(duration.subsec_nanos());
|
||||||
"{}: Total Transactions processed {}",
|
let tps = (sample * 1_000_000_000) as f64 / ns as f64;
|
||||||
val.transactions_addr, total
|
if tps > max_tps {
|
||||||
);
|
max_tps = tps;
|
||||||
if total == transactions.len() as u64 {
|
}
|
||||||
break;
|
println!("{}: {} tps", val.transactions_addr, tps);
|
||||||
|
total = tx_count - first_count;
|
||||||
|
println!(
|
||||||
|
"{}: Total Transactions processed {}",
|
||||||
|
val.transactions_addr, total
|
||||||
|
);
|
||||||
|
if total == transactions.len() as u64 {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if i > 20 && sample == 0 {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sleep(Duration::new(sample_period, 0));
|
||||||
}
|
}
|
||||||
if i > 20 && sample == 0 {
|
(max_tps, total)
|
||||||
break;
|
})
|
||||||
}
|
.collect();
|
||||||
sleep(Duration::new(1, 0));
|
let mut max_of_maxes = 0.0;
|
||||||
|
let mut total_txs = 0;
|
||||||
|
for (max, txs) in &maxes {
|
||||||
|
if *max > max_of_maxes {
|
||||||
|
max_of_maxes = *max;
|
||||||
}
|
}
|
||||||
});
|
total_txs += *txs;
|
||||||
|
}
|
||||||
|
println!(
|
||||||
|
"\nHighest TPS: {} sampling period {}s total transactions: {} clients: {}",
|
||||||
|
max_of_maxes,
|
||||||
|
sample_period,
|
||||||
|
total_txs,
|
||||||
|
maxes.len()
|
||||||
|
);
|
||||||
signal.store(true, Ordering::Relaxed);
|
signal.store(true, Ordering::Relaxed);
|
||||||
for t in c_threads {
|
for t in c_threads {
|
||||||
t.join().unwrap();
|
t.join().unwrap();
|
||||||
|
|
Loading…
Reference in New Issue