Fix args in validator script, readme version, client-demo perf print
This commit is contained in:
		
				
					committed by
					
						
						Greg Fitzgerald
					
				
			
			
				
	
			
			
			
						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,11 +175,16 @@ 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
 | 
				
			||||||
 | 
					        .into_par_iter()
 | 
				
			||||||
 | 
					        .map(|val| {
 | 
				
			||||||
            let mut client = mk_client(&client_addr, &val);
 | 
					            let mut client = mk_client(&client_addr, &val);
 | 
				
			||||||
            let mut now = Instant::now();
 | 
					            let mut now = Instant::now();
 | 
				
			||||||
            let mut initial_tx_count = client.transaction_count();
 | 
					            let mut initial_tx_count = client.transaction_count();
 | 
				
			||||||
 | 
					            let mut max_tps = 0.0;
 | 
				
			||||||
 | 
					            let mut total = 0;
 | 
				
			||||||
            for i in 0..100 {
 | 
					            for i in 0..100 {
 | 
				
			||||||
                let tx_count = client.transaction_count();
 | 
					                let tx_count = client.transaction_count();
 | 
				
			||||||
                let duration = now.elapsed();
 | 
					                let duration = now.elapsed();
 | 
				
			||||||
@@ -192,8 +197,11 @@ fn main() {
 | 
				
			|||||||
                );
 | 
					                );
 | 
				
			||||||
                let ns = duration.as_secs() * 1_000_000_000 + u64::from(duration.subsec_nanos());
 | 
					                let ns = duration.as_secs() * 1_000_000_000 + u64::from(duration.subsec_nanos());
 | 
				
			||||||
                let tps = (sample * 1_000_000_000) as f64 / ns as f64;
 | 
					                let tps = (sample * 1_000_000_000) as f64 / ns as f64;
 | 
				
			||||||
 | 
					                if tps > max_tps {
 | 
				
			||||||
 | 
					                    max_tps = tps;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                println!("{}: {} tps", val.transactions_addr, tps);
 | 
					                println!("{}: {} tps", val.transactions_addr, tps);
 | 
				
			||||||
            let total = tx_count - first_count;
 | 
					                total = tx_count - first_count;
 | 
				
			||||||
                println!(
 | 
					                println!(
 | 
				
			||||||
                    "{}: Total Transactions processed {}",
 | 
					                    "{}: Total Transactions processed {}",
 | 
				
			||||||
                    val.transactions_addr, total
 | 
					                    val.transactions_addr, total
 | 
				
			||||||
@@ -204,9 +212,26 @@ fn main() {
 | 
				
			|||||||
                if i > 20 && sample == 0 {
 | 
					                if i > 20 && sample == 0 {
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            sleep(Duration::new(1, 0));
 | 
					                sleep(Duration::new(sample_period, 0));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
    });
 | 
					            (max_tps, total)
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .collect();
 | 
				
			||||||
 | 
					    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();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user