pub fn run_scenario(mut ctx: ScenarioContext) {
    // Load config and construct test accounts
    let config = LoadTestConfig::load(&ctx.config_path);
    let (_event_loop_handle, transport) =
        Http::new(&ctx.options.web3_url).expect("http transport start");
    let test_accounts =
        TestAccount::construct_test_accounts(&config.input_accounts, transport, &ctx.options);

    let verify_timeout_sec = Duration::from_secs(config.verify_timeout_sec);
    let rpc_addr = ctx.rpc_addr.clone();

    let rpc_client = RpcClient::new(&rpc_addr);

    // Obtain the Ethereum node JSON RPC address.
    log::info!("Starting the loadtest");

    // Spawn the TPS counter.
    ctx.rt
        .spawn(run_tps_counter_printer(ctx.tps_counter.clone()));

    // Send the transactions and block until all of them are sent.
    let sent_txs = ctx.rt.block_on(send_transactions(
        test_accounts,
        rpc_client.clone(),
        config,
        ctx.rt.handle().clone(),
        ctx.tps_counter,
    ));

    // Wait until all the transactions are verified.
    log::info!("Waiting for all transactions to be verified");
    ctx.rt
        .block_on(wait_for_verify(sent_txs, verify_timeout_sec, &rpc_client))
        .expect("Verifying failed");
    log::info!("Loadtest completed.");
}
/// Runs the outgoing TPS scenario:
/// sends the different types of transactions, and measures the TPS for the sending
/// process (in other words, speed of the ZKSync node mempool).
Runs the outgoing TPS scenario:
sends the different types of transactions, and measures the TPS for the sending
process (in other words, speed of the ZKSync node mempool).
Runs the outgoing TPS scenario : sends the different types of transactions and measures the TPS for the sending process ( in other words speed of the ZKSync node mempool ) .
pub fn run_scenario(mut ctx: ScenarioContext) {
    // Load config and construct test accounts
    let config = LoadTestConfig::load(&ctx.config_path);
    let (_event_loop_handle, transport) =
        Http::new(&ctx.options.web3_url).expect("http transport start");
    let test_accounts =
        TestAccount::construct_test_accounts(&config.input_accounts, transport, &ctx.options);
    let verify_timeout_sec = Duration::from_secs(config.verify_timeout_sec);
    let rpc_addr = ctx.rpc_addr.clone();
    let rpc_client = RpcClient::new(&rpc_addr);
    // Obtain the Ethereum node JSON RPC address.
    log::info!("Starting the loadtest");
    // Spawn the TPS counter.
    ctx.rt
        .spawn(run_tps_counter_printer(ctx.tps_counter.clone()));
    // Send the transactions and block until all of them are sent.
    let sent_txs = ctx.rt.block_on(send_transactions(
        test_accounts,
        rpc_client.clone(),
        config,
        ctx.rt.handle().clone(),
        ctx.tps_counter,
    ));
    // Wait until all the transactions are verified.
    log::info!("Waiting for all transactions to be verified");
    ctx.rt
        .block_on(wait_for_verify(sent_txs, verify_timeout_sec, &rpc_client))
        .expect("Verifying failed");
    log::info!("Loadtest completed.");
}
pub fn run_scenario ( mut ctx : ScenarioContext ) { // Load config and construct test accounts let config = LoadTestConfig :: load ( & ctx . config_path ) ; let ( _event_loop_handle , transport ) = Http :: new ( & ctx . options . web3_url ) . expect ( " " ) ; let test_accounts = TestAccount :: construct_test_accounts ( & config . input_accounts , transport , & ctx . options ) ; let verify_timeout_sec = Duration :: from_secs ( config . verify_timeout_sec ) ; let rpc_addr = ctx . rpc_addr . clone ( ) ; let rpc_client = RpcClient :: new ( & rpc_addr ) ; // Obtain the Ethereum node JSON RPC address. log :: info ! ( " " ) ; // Spawn the TPS counter. ctx . rt . spawn ( run_tps_counter_printer ( ctx . tps_counter . clone ( ) ) ) ; // Send the transactions and block until all of them are sent. let sent_txs = ctx . rt . block_on ( send_transactions ( test_accounts , rpc_client . clone ( ) , config , ctx . rt . handle ( ) . clone ( ) , ctx . tps_counter , ) ) ; // Wait until all the transactions are verified. log :: info ! ( " " ) ; ctx . rt . block_on ( wait_for_verify ( sent_txs , verify_timeout_sec , & rpc_client ) ) . expect ( " " ) ; log :: info ! ( " " ) ; }
Runs the outgoing TPS scenario:
sends the different types of transactions, and measures the TPS for the sending
process (in other words, speed of the ZKSync node mempool).
Runs the outgoing TPS scenario : sends the different types of transactions and measures the TPS for the sending process ( in other words speed of the ZKSync node mempool ) .
ctx
ScenarioContext