mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 10:15:31 +00:00
aquatic_http_load_test: remove mio implementation, clean up
This commit is contained in:
parent
13d18bbf03
commit
e458cc54db
6 changed files with 242 additions and 586 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use std::{net::SocketAddr, path::PathBuf};
|
||||
use std::net::SocketAddr;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
|
@ -9,20 +9,11 @@ pub struct Config {
|
|||
pub num_workers: u8,
|
||||
pub num_connections: usize,
|
||||
pub duration: usize,
|
||||
pub network: NetworkConfig,
|
||||
pub torrents: TorrentConfig,
|
||||
}
|
||||
|
||||
impl aquatic_cli_helpers::Config for Config {}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct NetworkConfig {
|
||||
pub connection_creation_interval: usize,
|
||||
pub poll_timeout_microseconds: u64,
|
||||
pub poll_event_capacity: usize,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct TorrentConfig {
|
||||
|
|
@ -48,22 +39,11 @@ impl Default for Config {
|
|||
num_workers: 1,
|
||||
num_connections: 8,
|
||||
duration: 0,
|
||||
network: NetworkConfig::default(),
|
||||
torrents: TorrentConfig::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for NetworkConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
connection_creation_interval: 10,
|
||||
poll_timeout_microseconds: 197,
|
||||
poll_event_capacity: 64,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for TorrentConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue