mirror of
https://github.com/greatest-ape/aquatic.git
synced 2026-10-15 05:59:56 +00:00
aquatic: config: change default settings
This commit is contained in:
@@ -40,7 +40,7 @@ pub struct HandlerConfig {
|
||||
/// Maximum number of requests to receive from channel before locking
|
||||
/// mutex and starting work
|
||||
pub max_requests_per_iter: usize,
|
||||
pub channel_recv_timeout_ms: u64,
|
||||
pub channel_recv_timeout_microseconds: u64,
|
||||
}
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ impl Default for NetworkConfig {
|
||||
impl Default for HandlerConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
max_requests_per_iter: 2048,
|
||||
channel_recv_timeout_ms: 1,
|
||||
max_requests_per_iter: 10000,
|
||||
channel_recv_timeout_microseconds: 200,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ pub fn run_request_worker(
|
||||
let mut std_rng = StdRng::from_entropy();
|
||||
let mut small_rng = SmallRng::from_rng(&mut std_rng).unwrap();
|
||||
|
||||
let timeout = Duration::from_millis(
|
||||
config.handlers.channel_recv_timeout_ms
|
||||
let timeout = Duration::from_micros(
|
||||
config.handlers.channel_recv_timeout_microseconds
|
||||
);
|
||||
|
||||
loop {
|
||||
|
||||
Reference in New Issue
Block a user