Don't use count_valid_ids in bench
This commit is contained in:
		
							
								
								
									
										1
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							@@ -2182,7 +2182,6 @@ version = "0.12.0"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
			
		||||
 "bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
			
		||||
 "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
			
		||||
 "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
			
		||||
 "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
			
		||||
 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
 | 
			
		||||
 
 | 
			
		||||
@@ -117,9 +117,7 @@ fn bench_banking_stage_multi_accounts(bencher: &mut Bencher) {
 | 
			
		||||
 | 
			
		||||
    bencher.iter(move || {
 | 
			
		||||
        // make sure the tx last id is still registered
 | 
			
		||||
        if bank.count_valid_ids(&[mint.last_id()]).len() == 0 {
 | 
			
		||||
            bank.register_tick(&mint.last_id());
 | 
			
		||||
        }
 | 
			
		||||
        bank.register_tick(&mint.last_id());
 | 
			
		||||
        for v in verified.chunks(verified.len() / num_threads) {
 | 
			
		||||
            verified_sender.send(v.to_vec()).unwrap();
 | 
			
		||||
        }
 | 
			
		||||
@@ -222,9 +220,7 @@ fn bench_banking_stage_multi_programs(bencher: &mut Bencher) {
 | 
			
		||||
 | 
			
		||||
    bencher.iter(move || {
 | 
			
		||||
        // make sure the transactions are still valid
 | 
			
		||||
        if bank.count_valid_ids(&[mint.last_id()]).len() == 0 {
 | 
			
		||||
            bank.register_tick(&mint.last_id());
 | 
			
		||||
        }
 | 
			
		||||
        bank.register_tick(&mint.last_id());
 | 
			
		||||
        for v in verified.chunks(verified.len() / num_threads) {
 | 
			
		||||
            verified_sender.send(v.to_vec()).unwrap();
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user