tokio metrics
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
5ec49b3f62
commit
cce270d938
13 changed files with 157 additions and 33 deletions
|
@ -20,7 +20,7 @@ use tokio::runtime;
|
|||
|
||||
const WORKER_NAME: &str = "conduwuit:worker";
|
||||
const WORKER_MIN: usize = 2;
|
||||
const WORKER_KEEPALIVE_MS: u64 = 2500;
|
||||
const WORKER_KEEPALIVE: u64 = 36;
|
||||
|
||||
fn main() -> Result<(), Error> {
|
||||
let args = clap::parse();
|
||||
|
@ -29,7 +29,7 @@ fn main() -> Result<(), Error> {
|
|||
.enable_time()
|
||||
.thread_name(WORKER_NAME)
|
||||
.worker_threads(cmp::max(WORKER_MIN, available_parallelism()))
|
||||
.thread_keep_alive(Duration::from_millis(WORKER_KEEPALIVE_MS))
|
||||
.thread_keep_alive(Duration::from_secs(WORKER_KEEPALIVE))
|
||||
.build()
|
||||
.expect("built runtime");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue