add tx-count option

This commit is contained in:
GroovieGermanikus 2024-02-01 11:15:06 +01:00
parent 215f8dda23
commit 02f15cb4e2
No known key found for this signature in database
GPG Key ID: 5B6EB831A5CD2015
1 changed files with 10 additions and 1 deletions

View File

@ -26,14 +26,23 @@ use grpc_banking_transactions_notifications::postgres::{AccountsForTransaction,
#[derive(Parser, Debug, Clone)]
#[command(author, version, about, long_about = None)]
pub struct Args {
#[arg(short, long)]
pub tx_count: usize,
}
#[tokio::main()]
async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt::init();
let Args { tx_count } = Args::parse();
let postgres_session = PostgresSession::new(0).await.unwrap();
let amt_data = (1..5).map(|i| {
let amt_data = (0..tx_count).map(|i| {
let tx_sig = Signature::new_unique();
let accounts = (1..10).map(|j| {