feat(common,server): add ProtocolMode and route server through protocol dispatch

This commit is contained in:
2026-02-26 14:50:49 +02:00
parent 0ea39e7663
commit 6198e3ab2e
11 changed files with 79 additions and 47 deletions

View File

@@ -1,5 +1,5 @@
use clap::Parser;
use common::KeyExchangeMode;
use common::prelude::*;
use std::{net::SocketAddr, path::PathBuf};
/// TLS benchmark runner.
@@ -10,31 +10,31 @@ pub struct Args {
#[arg(long, default_value = "x25519")]
pub mode: KeyExchangeMode,
/// Server address to connect to.
/// Server address to connect to
#[arg(long, required_unless_present = "config")]
pub server: Option<SocketAddr>,
/// Payload size in bytes to request from server.
/// Payload size in bytes to request from server
#[arg(long, default_value = "1024")]
pub payload_bytes: u32,
/// Number of benchmark iterations (excluding warmup).
/// Number of benchmark iterations (excluding warmup)
#[arg(long, default_value = "100")]
pub iters: u32,
/// Number of warmup iterations (not recorded).
/// Number of warmup iterations (not recorded)
#[arg(long, default_value = "10")]
pub warmup: u32,
/// Number of concurrent connections.
/// Number of concurrent connections
#[arg(long, default_value = "1")]
pub concurrency: u32,
/// Output file for NDJSON records (stdout if not specified).
/// Output file for NDJSON records (stdout if not specified)
#[arg(long)]
pub out: Option<PathBuf>,
/// Config file for matrix benchmarks (TOML).
#[arg(long)]
/// Config file for matrix benchmarks (TOML)
#[arg(long, short)]
pub config: Option<PathBuf>,
}