wire up size_tx
This commit is contained in:
parent
8aca443d56
commit
f3657d7db1
|
@ -20,6 +20,7 @@ use tokio::time::Instant;
|
|||
#[derive(Debug, Clone)]
|
||||
pub struct BenchConfig {
|
||||
pub tx_count: usize,
|
||||
pub tx_size: TxSize,
|
||||
pub cu_price_micro_lamports: u64,
|
||||
}
|
||||
|
||||
|
@ -33,11 +34,10 @@ pub async fn bench_servicerunner(
|
|||
bench_config: &BenchConfig,
|
||||
rpc_addr: String,
|
||||
funded_payer: Keypair,
|
||||
size_tx: TxSize,
|
||||
) -> Metric {
|
||||
let started_at = Instant::now();
|
||||
|
||||
let transaction_size = match size_tx {
|
||||
let transaction_size = match bench_config.tx_size {
|
||||
TxSize::Small => TransactionSize::Small,
|
||||
TxSize::Large => TransactionSize::Large,
|
||||
};
|
||||
|
|
|
@ -2,9 +2,7 @@ use std::sync::Arc;
|
|||
use std::time::Duration;
|
||||
use log::error;
|
||||
use solana_rpc_client::nonblocking::rpc_client::RpcClient;
|
||||
use solana_sdk::commitment_config::CommitmentConfig;
|
||||
use solana_sdk::signature::Keypair;
|
||||
use tokio::time::Instant;
|
||||
use crate::benches::confirmation_rate;
|
||||
use crate::benches::confirmation_rate::{send_bulk_txs_and_wait};
|
||||
use crate::BenchmarkTransactionParams;
|
||||
|
@ -18,7 +16,7 @@ pub async fn benchnew_confirmation_rate_servicerunner(
|
|||
) -> confirmation_rate::Metric {
|
||||
let rpc = Arc::new(RpcClient::new(rpc_addr));
|
||||
let tx_params = BenchmarkTransactionParams {
|
||||
tx_size: TxSize::Small,
|
||||
tx_size: bench_config.tx_size,
|
||||
cu_price_micro_lamports: bench_config.cu_price_micro_lamports,
|
||||
};
|
||||
let max_timeout = Duration::from_secs(60);
|
||||
|
|
|
@ -80,6 +80,7 @@ async fn main() {
|
|||
.iter()
|
||||
.map(|prio_fees| BenchConfig {
|
||||
tx_count,
|
||||
tx_size: size_tx,
|
||||
cu_price_micro_lamports: *prio_fees,
|
||||
})
|
||||
.collect_vec();
|
||||
|
@ -235,7 +236,6 @@ impl BenchRunner for BenchRunnerBench1Impl {
|
|||
&self.bench_config,
|
||||
self.tenant_config.rpc_addr.clone(),
|
||||
self.funded_payer.insecure_clone(),
|
||||
self.size_tx,
|
||||
)
|
||||
.await;
|
||||
self.metric.set(metric).unwrap();
|
||||
|
|
|
@ -14,6 +14,7 @@ lazy_static::lazy_static! {
|
|||
// TODO add more
|
||||
}
|
||||
|
||||
// TODO implement
|
||||
pub async fn publish_metrics_on_prometheus(
|
||||
tenant_config: &TenantConfig,
|
||||
_bench_config: &BenchConfig,
|
||||
|
|
Loading…
Reference in New Issue