mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 02:05:30 +00:00
aquatic: config: change default settings
This commit is contained in:
parent
ca52b44389
commit
8f68b3a9a2
2 changed files with 5 additions and 5 deletions
|
|
@ -40,7 +40,7 @@ pub struct HandlerConfig {
|
||||||
/// Maximum number of requests to receive from channel before locking
|
/// Maximum number of requests to receive from channel before locking
|
||||||
/// mutex and starting work
|
/// mutex and starting work
|
||||||
pub max_requests_per_iter: usize,
|
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 {
|
impl Default for HandlerConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
max_requests_per_iter: 2048,
|
max_requests_per_iter: 10000,
|
||||||
channel_recv_timeout_ms: 1,
|
channel_recv_timeout_microseconds: 200,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ pub fn run_request_worker(
|
||||||
let mut std_rng = StdRng::from_entropy();
|
let mut std_rng = StdRng::from_entropy();
|
||||||
let mut small_rng = SmallRng::from_rng(&mut std_rng).unwrap();
|
let mut small_rng = SmallRng::from_rng(&mut std_rng).unwrap();
|
||||||
|
|
||||||
let timeout = Duration::from_millis(
|
let timeout = Duration::from_micros(
|
||||||
config.handlers.channel_recv_timeout_ms
|
config.handlers.channel_recv_timeout_microseconds
|
||||||
);
|
);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue