mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
Rename aquatic_load_tester to aquatic_bencher
This commit is contained in:
parent
6f9b0fce7b
commit
af45feb911
10 changed files with 28 additions and 27 deletions
|
|
@ -1,42 +0,0 @@
|
|||
pub mod common;
|
||||
pub mod protocols;
|
||||
pub mod run;
|
||||
pub mod set;
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
use common::CpuMode;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(author, version, about)]
|
||||
struct Args {
|
||||
/// How to choose which virtual CPUs to allow trackers and load test
|
||||
/// executables on
|
||||
#[arg(long, default_value_t = CpuMode::Split)]
|
||||
cpu_mode: CpuMode,
|
||||
/// Minimum number of tracker cpu cores to run load tests for
|
||||
#[arg(long)]
|
||||
min_cores: Option<usize>,
|
||||
/// Maximum number of tracker cpu cores to run load tests for
|
||||
#[arg(long)]
|
||||
max_cores: Option<usize>,
|
||||
#[command(subcommand)]
|
||||
command: Command,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
enum Command {
|
||||
/// Benchmark UDP BitTorrent trackers aquatic_udp and opentracker
|
||||
#[cfg(feature = "udp")]
|
||||
Udp(protocols::udp::UdpCommand),
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let args = Args::parse();
|
||||
|
||||
match args.command {
|
||||
#[cfg(feature = "udp")]
|
||||
Command::Udp(command) => command
|
||||
.run(args.cpu_mode, args.min_cores, args.max_cores)
|
||||
.unwrap(),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue