Add option to wait for a specific epoch length to bench-tps (#10083)

This commit is contained in:
sakridge
2020-05-20 16:42:46 -07:00
committed by GitHub
parent 417f0e41fa
commit ce17de7d25
13 changed files with 256 additions and 128 deletions

View File

@@ -11,6 +11,7 @@ use solana_sdk::{
client::{AsyncClient, Client, SyncClient},
clock::MAX_PROCESSING_AGE,
commitment_config::CommitmentConfig,
epoch_info::EpochInfo,
fee_calculator::{FeeCalculator, FeeRateGovernor},
hash::Hash,
instruction::Instruction,
@@ -518,6 +519,10 @@ impl SyncClient for ThinClient {
Ok(slot)
}
fn get_epoch_info(&self) -> TransportResult<EpochInfo> {
self.rpc_client().get_epoch_info().map_err(|e| e.into())
}
fn get_transaction_count(&self) -> TransportResult<u64> {
let index = self.optimizer.experiment();
let now = Instant::now();